Struct der::Length [−][src]
pub struct Length(_);
Expand description
ASN.1-encoded length.
Maximum length is defined by the Length::MAX
constant (1 MiB).
Implementations
impl Length
[src]
impl Length
[src]pub const fn zero() -> Self
[src]
👎 Deprecated since 0.3.3: please use Length::ZERO
pub const fn zero() -> Self
[src]please use Length::ZERO
Return a length of 0
.
pub const fn one() -> Self
[src]
👎 Deprecated since 0.3.3: please use Length::ONE
pub const fn one() -> Self
[src]please use Length::ONE
Return a length of 1
.
Trait Implementations
impl Encodable for Length
[src]
impl Encodable for Length
[src]fn encoded_len(&self) -> Result<Length>
[src]
fn encoded_len(&self) -> Result<Length>
[src]Compute the length of this value in bytes when encoded as ASN.1 DER.
fn encode(&self, encoder: &mut Encoder<'_>) -> Result<()>
[src]
fn encode(&self, encoder: &mut Encoder<'_>) -> Result<()>
[src]Encode this value as ASN.1 DER using the provided Encoder
.
fn encode_to_slice<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8]>
[src]
fn encode_to_slice<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8]>
[src]Encode this value to the provided byte slice, returning a sub-slice containing the encoded message. Read more
impl Ord for Length
[src]
impl Ord for Length
[src]impl PartialOrd<Length> for Length
[src]
impl PartialOrd<Length> for Length
[src]fn partial_cmp(&self, other: &Length) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &Length) -> Option<Ordering>
[src]This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Copy for Length
[src]
impl Eq for Length
[src]
impl StructuralEq for Length
[src]
impl StructuralPartialEq for Length
[src]
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
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more