Struct asn1_der::DerValue[][src]

pub struct DerValue {
    pub data: Vec<u8>,
}

A wrapper around a DER value

Fields

data: Vec<u8>

The value

Implementations

impl DerValue[src]

pub fn deserialize<'a>(
    source: impl Iterator<Item = &'a u8>,
    len: impl Into<usize>
) -> Result<Self, Asn1DerError>
[src]

DER-deserializes the data from source

pub fn serialized_len(&self) -> usize[src]

The length of the DER-serialized representation of self

pub fn serialize<'a>(
    &self,
    buf: impl Iterator<Item = &'a mut u8>
) -> Result<usize, Asn1DerError>
[src]

DER-serializes self into buf and returns the amount of bytes written

pub fn compute_serialized_len(payload_len: usize) -> usize[src]

Efficiently computes the length of the DER-serialized representation of payload_len bytes

Trait Implementations

impl Clone for DerValue[src]

impl Debug for DerValue[src]

impl Eq for DerValue[src]

impl From<DerValue> for Vec<u8>[src]

impl From<Vec<u8, Global>> for DerValue[src]

impl PartialEq<DerValue> for DerValue[src]

impl StructuralEq for DerValue[src]

impl StructuralPartialEq for DerValue[src]

Auto Trait Implementations

impl RefUnwindSafe for DerValue

impl Send for DerValue

impl Sync for DerValue

impl Unpin for DerValue

impl UnwindSafe for DerValue

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.