pub struct Nsec3Salt<Octs: ?Sized>(/* private fields */);
Expand description
The salt value of an NSEC3 record.
The salt can never be longer than 255 octets since its length is encoded as a single octet.
The salt uses Base 16 (i.e., hex digits) as its representation format with no whitespace allowed.
Implementations§
Source§impl<Octs: ?Sized> Nsec3Salt<Octs>
impl<Octs: ?Sized> Nsec3Salt<Octs>
Sourcepub fn from_octets(octets: Octs) -> Result<Self, Nsec3SaltError>
pub fn from_octets(octets: Octs) -> Result<Self, Nsec3SaltError>
Crates a new salt value from the given octets.
Returns succesfully if octets
can indeed be used as a
character string, i.e., it is not longer than 255 bytes.
Sourcepub fn into_octets(self) -> Octswhere
Octs: Sized,
pub fn into_octets(self) -> Octswhere
Octs: Sized,
Converts the salt value into the underlying octets.
Source§impl Nsec3Salt<Bytes>
impl Nsec3Salt<Bytes>
Sourcepub fn from_bytes(bytes: Bytes) -> Result<Self, Nsec3SaltError>
pub fn from_bytes(bytes: Bytes) -> Result<Self, Nsec3SaltError>
Creates a new salt from a bytes value.
Source§impl Nsec3Salt<[u8]>
impl Nsec3Salt<[u8]>
Sourcepub fn from_slice(slice: &[u8]) -> Result<&Self, Nsec3SaltError>
pub fn from_slice(slice: &[u8]) -> Result<&Self, Nsec3SaltError>
Creates a new salt value from an octet slice.
Trait Implementations§
Source§impl<T, U> CanonicalOrd<Nsec3Salt<U>> for Nsec3Salt<T>
impl<T, U> CanonicalOrd<Nsec3Salt<U>> for Nsec3Salt<T>
Source§fn canonical_cmp(&self, other: &Nsec3Salt<U>) -> Ordering
fn canonical_cmp(&self, other: &Nsec3Salt<U>) -> Ordering
Returns the canonical ordering between
self
and other
.Source§fn canonical_lt(&self, other: &Rhs) -> bool
fn canonical_lt(&self, other: &Rhs) -> bool
Returns whether
self
is canonically less than other
.Source§fn canonical_le(&self, other: &Rhs) -> bool
fn canonical_le(&self, other: &Rhs) -> bool
Returns whether
self
is canonically less than or equal to other
.Source§fn canonical_gt(&self, other: &Rhs) -> bool
fn canonical_gt(&self, other: &Rhs) -> bool
Returns whether
self
is canonically greater than other
.Source§fn canonical_ge(&self, other: &Rhs) -> bool
fn canonical_ge(&self, other: &Rhs) -> bool
Returns whether
self
is canonically greater than or equal to other
.Source§impl<Octs, SrcOcts> OctetsFrom<Nsec3Salt<SrcOcts>> for Nsec3Salt<Octs>where
Octs: OctetsFrom<SrcOcts>,
impl<Octs, SrcOcts> OctetsFrom<Nsec3Salt<SrcOcts>> for Nsec3Salt<Octs>where
Octs: OctetsFrom<SrcOcts>,
type Error = <Octs as OctetsFrom<SrcOcts>>::Error
Source§fn try_octets_from(source: Nsec3Salt<SrcOcts>) -> Result<Self, Self::Error>
fn try_octets_from(source: Nsec3Salt<SrcOcts>) -> Result<Self, Self::Error>
Performs the conversion.
Source§fn octets_from(source: Source) -> Self
fn octets_from(source: Source) -> Self
Performs an infallible conversion.
Source§impl<T: AsRef<[u8]> + ?Sized> Ord for Nsec3Salt<T>
impl<T: AsRef<[u8]> + ?Sized> Ord for Nsec3Salt<T>
Source§impl<T, U> PartialOrd<U> for Nsec3Salt<T>
impl<T, U> PartialOrd<U> for Nsec3Salt<T>
impl<T: AsRef<[u8]> + ?Sized> Eq for Nsec3Salt<T>
Auto Trait Implementations§
impl<Octs> Freeze for Nsec3Salt<Octs>
impl<Octs> RefUnwindSafe for Nsec3Salt<Octs>where
Octs: RefUnwindSafe + ?Sized,
impl<Octs> Send for Nsec3Salt<Octs>
impl<Octs> Sync for Nsec3Salt<Octs>
impl<Octs> Unpin for Nsec3Salt<Octs>
impl<Octs> UnwindSafe for Nsec3Salt<Octs>where
Octs: UnwindSafe + ?Sized,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
impl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
type Error = <Target as OctetsFrom<Source>>::Error
Source§fn try_octets_into(
self,
) -> Result<Target, <Source as OctetsInto<Target>>::Error>
fn try_octets_into( self, ) -> Result<Target, <Source as OctetsInto<Target>>::Error>
Performs the conversion.
Source§fn octets_into(self) -> Target
fn octets_into(self) -> Target
Performs an infallible conversion.