pub struct OwnerHash<Octs: ?Sized>(/* private fields */);
Expand description
The hash over the next owner name.
This hash is used instead of the actual owner name in an NSEC3 record.
The hash can never be longer than 255 octets since its length is encoded as a single octet.
For its presentation format, the hash uses an unpadded Base 32 encoding with no whitespace allowed.
Implementations§
source§impl<Octs> OwnerHash<Octs>
impl<Octs> OwnerHash<Octs>
sourcepub fn from_octets(octets: Octs) -> Result<Self, OwnerHashError>
pub fn from_octets(octets: Octs) -> Result<Self, OwnerHashError>
Creates a new owner hash 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.
pub fn scan<S: Scanner<Octets = Octs>>( scanner: &mut S, ) -> Result<Self, S::Error>
sourcepub fn into_octets(self) -> Octswhere
Octs: Sized,
pub fn into_octets(self) -> Octswhere
Octs: Sized,
Converts the hash into the underlying octets.
source§impl OwnerHash<Bytes>
impl OwnerHash<Bytes>
sourcepub fn from_bytes(bytes: Bytes) -> Result<Self, OwnerHashError>
pub fn from_bytes(bytes: Bytes) -> Result<Self, OwnerHashError>
Creates a new owner hash from a bytes value.
source§impl OwnerHash<[u8]>
impl OwnerHash<[u8]>
sourcepub fn from_slice(slice: &[u8]) -> Result<&Self, OwnerHashError>
pub fn from_slice(slice: &[u8]) -> Result<&Self, OwnerHashError>
Creates a new owner hash from an octet slice.
Trait Implementations§
source§impl<T, U> CanonicalOrd<OwnerHash<U>> for OwnerHash<T>
impl<T, U> CanonicalOrd<OwnerHash<U>> for OwnerHash<T>
source§fn canonical_cmp(&self, other: &OwnerHash<U>) -> Ordering
fn canonical_cmp(&self, other: &OwnerHash<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<OwnerHash<SrcOcts>> for OwnerHash<Octs>where
Octs: OctetsFrom<SrcOcts>,
impl<Octs, SrcOcts> OctetsFrom<OwnerHash<SrcOcts>> for OwnerHash<Octs>where
Octs: OctetsFrom<SrcOcts>,
source§impl<T, U> PartialOrd<U> for OwnerHash<T>
impl<T, U> PartialOrd<U> for OwnerHash<T>
impl<T: AsRef<[u8]> + ?Sized> Eq for OwnerHash<T>
Auto Trait Implementations§
impl<Octs> Freeze for OwnerHash<Octs>
impl<Octs> RefUnwindSafe for OwnerHash<Octs>where
Octs: RefUnwindSafe + ?Sized,
impl<Octs> Send for OwnerHash<Octs>
impl<Octs> Sync for OwnerHash<Octs>
impl<Octs> Unpin for OwnerHash<Octs>
impl<Octs> UnwindSafe for OwnerHash<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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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.