Enum der_parser::ber::Length
source · pub enum Length {
Definite(usize),
Indefinite,
}
Expand description
BER Object Length
Variants§
Implementations§
Trait Implementations§
source§impl AddAssign<usize> for Length
impl AddAssign<usize> for Length
source§fn add_assign(&mut self, rhs: usize)
fn add_assign(&mut self, rhs: usize)
Performs the
+=
operation. Read moresource§impl PartialEq<Length> for Length
impl PartialEq<Length> for Length
source§impl ToDer for Length
impl ToDer for Length
source§fn to_der_len(&self) -> Result<usize, Error>
fn to_der_len(&self) -> Result<usize, Error>
Get the length of the object (including the header), when encoded
source§fn write_der_header(
&self,
writer: &mut dyn Write
) -> Result<usize, SerializeError>
fn write_der_header( &self, writer: &mut dyn Write ) -> Result<usize, SerializeError>
Attempt to write the DER header to this writer.
source§fn write_der_content(
&self,
_writer: &mut dyn Write
) -> Result<usize, SerializeError>
fn write_der_content( &self, _writer: &mut dyn Write ) -> Result<usize, SerializeError>
Attempt to write the DER content (all except header) to this writer.
source§fn to_der_vec(&self) -> Result<Vec<u8, Global>, SerializeError>
fn to_der_vec(&self) -> Result<Vec<u8, Global>, SerializeError>
Write the DER encoded representation to a newly allocated
Vec<u8>
.source§fn to_der_vec_raw(&self) -> Result<Vec<u8, Global>, SerializeError>
fn to_der_vec_raw(&self) -> Result<Vec<u8, Global>, SerializeError>
Similar to using
to_vec
, but uses provided values without changes.
This can generate an invalid encoding for a DER object.source§fn write_der(&self, writer: &mut dyn Write) -> Result<usize, SerializeError>
fn write_der(&self, writer: &mut dyn Write) -> Result<usize, SerializeError>
Attempt to write the DER encoded representation (header and content) into this writer. Read more
source§fn write_der_raw(&self, writer: &mut dyn Write) -> Result<usize, SerializeError>
fn write_der_raw(&self, writer: &mut dyn Write) -> Result<usize, SerializeError>
Similar to using
to_der
, but uses provided values without changes.
This can generate an invalid encoding for a DER object.