[−][src]Struct der::Length
Implementations
impl Length
[src]
pub const fn zero() -> Self
[src]
Return a length of 0
.
pub const fn max() -> usize
[src]
Get the maximum length supported by this crate
pub fn to_usize(self) -> usize
[src]
Convert length to usize
Trait Implementations
impl Add<Length> for Length
[src]
type Output = Result<Self>
The resulting type after applying the +
operator.
pub fn add(self, other: Self) -> Result<Self>
[src]
impl Add<Length> for Result<Length>
[src]
type Output = Self
The resulting type after applying the +
operator.
pub fn add(self, other: Length) -> Self
[src]
impl Add<u16> for Length
[src]
type Output = Result<Self>
The resulting type after applying the +
operator.
pub fn add(self, other: u16) -> Result<Self>
[src]
impl Add<u8> for Length
[src]
type Output = Result<Self>
The resulting type after applying the +
operator.
pub fn add(self, other: u8) -> Result<Self>
[src]
impl Add<usize> for Length
[src]
type Output = Result<Self>
The resulting type after applying the +
operator.
pub fn add(self, other: usize) -> Result<Self>
[src]
impl Clone for Length
[src]
impl Copy for Length
[src]
impl Debug for Length
[src]
impl<'_> Decodable<'_> for Length
[src]
pub fn decode(decoder: &mut Decoder<'_>) -> Result<Length>
[src]
pub fn from_bytes(bytes: &'a [u8]) -> Result<Self>
[src]
impl Default for Length
[src]
impl Display for Length
[src]
impl Encodable for Length
[src]
pub fn encoded_len(&self) -> Result<Length>
[src]
pub fn encode(&self, encoder: &mut Encoder<'_>) -> Result<()>
[src]
pub fn encode_to_slice<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8]>
[src]
pub fn encode_to_vec(&self, buf: &mut Vec<u8>) -> Result<Length>
[src]
pub fn to_vec(&self) -> Result<Vec<u8>>
[src]
impl Eq for Length
[src]
impl From<Length> for u16
[src]
impl From<Length> for usize
[src]
impl From<u16> for Length
[src]
impl From<u8> for Length
[src]
impl Ord for Length
[src]
pub fn cmp(&self, other: &Length) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<Length> for Length
[src]
impl PartialOrd<Length> for Length
[src]
pub fn partial_cmp(&self, other: &Length) -> Option<Ordering>
[src]
pub fn lt(&self, other: &Length) -> bool
[src]
pub fn le(&self, other: &Length) -> bool
[src]
pub fn gt(&self, other: &Length) -> bool
[src]
pub fn ge(&self, other: &Length) -> bool
[src]
impl StructuralEq for Length
[src]
impl StructuralPartialEq for Length
[src]
impl TryFrom<usize> for Length
[src]
Auto Trait Implementations
impl RefUnwindSafe for Length
[src]
impl Send for Length
[src]
impl Sync for Length
[src]
impl Unpin for Length
[src]
impl UnwindSafe for Length
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,