pub struct Nsec3Salt<Octets: ?Sized>(_);
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<Octets: ?Sized> Nsec3Salt<Octets>
impl<Octets: ?Sized> Nsec3Salt<Octets>
sourcepub fn from_octets(octets: Octets) -> Result<Self, Nsec3SaltError>where
Octets: AsRef<[u8]> + Sized,
pub fn from_octets(octets: Octets) -> Result<Self, Nsec3SaltError>where Octets: AsRef<[u8]> + Sized,
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) -> Octetswhere
Octets: Sized,
pub fn into_octets(self) -> Octetswhere Octets: 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>where
T: AsRef<[u8]> + ?Sized,
U: AsRef<[u8]> + ?Sized,
impl<T, U> CanonicalOrd<Nsec3Salt<U>> for Nsec3Salt<T>where T: AsRef<[u8]> + ?Sized, U: AsRef<[u8]> + ?Sized,
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<Octets: AsRef<[u8]> + ?Sized> Compose for Nsec3Salt<Octets>
impl<Octets: AsRef<[u8]> + ?Sized> Compose for Nsec3Salt<Octets>
source§impl<Octets> FromStr for Nsec3Salt<Octets>where
Octets: FromBuilder,
<Octets as FromBuilder>::Builder: OctetsBuilder<Octets = Octets> + EmptyBuilder,
impl<Octets> FromStr for Nsec3Salt<Octets>where Octets: FromBuilder, <Octets as FromBuilder>::Builder: OctetsBuilder<Octets = Octets> + EmptyBuilder,
source§impl<Octets, SrcOctets> OctetsFrom<Nsec3Salt<SrcOctets>> for Nsec3Salt<Octets>where
Octets: OctetsFrom<SrcOctets>,
impl<Octets, SrcOctets> OctetsFrom<Nsec3Salt<SrcOctets>> for Nsec3Salt<Octets>where Octets: OctetsFrom<SrcOctets>,
source§impl<T, U> PartialEq<U> for Nsec3Salt<T>where
T: AsRef<[u8]> + ?Sized,
U: AsRef<[u8]> + ?Sized,
impl<T, U> PartialEq<U> for Nsec3Salt<T>where T: AsRef<[u8]> + ?Sized, U: AsRef<[u8]> + ?Sized,
source§impl<T, U> PartialOrd<U> for Nsec3Salt<T>where
T: AsRef<[u8]> + ?Sized,
U: AsRef<[u8]> + ?Sized,
impl<T, U> PartialOrd<U> for Nsec3Salt<T>where T: AsRef<[u8]> + ?Sized, U: AsRef<[u8]> + ?Sized,
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<T: AsRef<[u8]> + ?Sized> Eq for Nsec3Salt<T>
Auto Trait Implementations§
impl<Octets: ?Sized> RefUnwindSafe for Nsec3Salt<Octets>where Octets: RefUnwindSafe,
impl<Octets: ?Sized> Send for Nsec3Salt<Octets>where Octets: Send,
impl<Octets: ?Sized> Sync for Nsec3Salt<Octets>where Octets: Sync,
impl<Octets: ?Sized> Unpin for Nsec3Salt<Octets>where Octets: Unpin,
impl<Octets: ?Sized> UnwindSafe for Nsec3Salt<Octets>where Octets: UnwindSafe,
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<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
impl<Source, Target> OctetsInto<Target> for Sourcewhere Target: OctetsFrom<Source>,
source§fn octets_into(self) -> Result<Target, ShortBuf>
fn octets_into(self) -> Result<Target, ShortBuf>
Performs the conversion.