pub struct Length(/* private fields */);
Expand description
ASN.1-encoded length.
Maximum length is defined by the Length::MAX
constant (256 MiB).
Implementations§
Trait Implementations§
source§impl Encodable for Length
impl Encodable for Length
source§fn encoded_len(&self) -> Result<Length>
fn encoded_len(&self) -> Result<Length>
Compute the length of this value in bytes when encoded as ASN.1 DER.
source§fn encode(&self, encoder: &mut Encoder<'_>) -> Result<()>
fn encode(&self, encoder: &mut Encoder<'_>) -> Result<()>
Encode this value as ASN.1 DER using the provided
Encoder
.source§fn encode_to_slice<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8]>
fn encode_to_slice<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8]>
Encode this value to the provided byte slice, returning a sub-slice
containing the encoded message.
source§impl Ord for Length
impl Ord for Length
source§impl PartialEq for Length
impl PartialEq for Length
source§impl PartialOrd for Length
impl PartialOrd for Length
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for Length
impl Eq for Length
impl StructuralEq for Length
impl StructuralPartialEq for Length
Auto Trait Implementations§
impl RefUnwindSafe for Length
impl Send for Length
impl Sync for Length
impl Unpin for Length
impl UnwindSafe for Length
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more