Struct asn1_der::DerLength [−][src]
pub struct DerLength { pub len: usize, }
A wrapper around a DER length
Fields
len: usize
The length
Implementations
impl DerLength
[src]
impl DerLength
[src]pub fn deserialize<'a>(
source: impl Iterator<Item = &'a u8>
) -> Result<Self, Asn1DerError>
[src]
source: impl Iterator<Item = &'a u8>
) -> Result<Self, Asn1DerError>
DER-deserializes a length 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]
&self,
buf: impl Iterator<Item = &'a mut u8>
) -> Result<usize, Asn1DerError>
DER-serializes self
into buf
and returns the amount of bytes written
pub fn compute_serialized_len(len: usize) -> usize
[src]
Efficiently computes the length of the DER-serialized representation of len