pub struct Cds<Octs> { /* private fields */ }
Implementations§
source§impl<Octs> Cds<Octs>
impl<Octs> Cds<Octs>
pub fn new( key_tag: u16, algorithm: SecAlg, digest_type: DigestAlg, digest: Octs, ) -> Result<Self, LongRecordData>
sourcepub unsafe fn new_unchecked(
key_tag: u16,
algorithm: SecAlg,
digest_type: DigestAlg,
digest: Octs,
) -> Self
pub unsafe fn new_unchecked( key_tag: u16, algorithm: SecAlg, digest_type: DigestAlg, digest: Octs, ) -> Self
Creates new CDS record data without checking.
§Safety
The caller needs to ensure that wire format representation of the record data is at most 65,535 octets long.
pub fn key_tag(&self) -> u16
pub fn algorithm(&self) -> SecAlg
pub fn digest_type(&self) -> DigestAlg
pub fn digest(&self) -> &Octs
pub fn into_digest(self) -> Octs
pub fn parse<'a, Src: Octets<Range<'a> = Octs> + ?Sized>( parser: &mut Parser<'a, Src>, ) -> Result<Self, ParseError>
pub fn scan<S: Scanner<Octets = Octs>>( scanner: &mut S, ) -> Result<Self, S::Error>
Trait Implementations§
source§impl<Octs, Other> CanonicalOrd<Cds<Other>> for Cds<Octs>
impl<Octs, Other> CanonicalOrd<Cds<Other>> for Cds<Octs>
source§fn canonical_cmp(&self, other: &Cds<Other>) -> Ordering
fn canonical_cmp(&self, other: &Cds<Other>) -> 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: AsRef<[u8]>> ComposeRecordData for Cds<Octs>
impl<Octs: AsRef<[u8]>> ComposeRecordData for Cds<Octs>
source§fn rdlen(&self, _compress: bool) -> Option<u16>
fn rdlen(&self, _compress: bool) -> Option<u16>
Returns the length of the record data if available. Read more
source§fn compose_rdata<Target: Composer + ?Sized>(
&self,
target: &mut Target,
) -> Result<(), Target::AppendError>
fn compose_rdata<Target: Composer + ?Sized>( &self, target: &mut Target, ) -> Result<(), Target::AppendError>
Appends the wire format of the record data into
target
.source§fn compose_canonical_rdata<Target: Composer + ?Sized>(
&self,
target: &mut Target,
) -> Result<(), Target::AppendError>
fn compose_canonical_rdata<Target: Composer + ?Sized>( &self, target: &mut Target, ) -> Result<(), Target::AppendError>
Appends the canonical wire format of the record data into
target
.source§fn compose_len_rdata<Target: Composer + ?Sized>(
&self,
target: &mut Target,
) -> Result<(), Target::AppendError>
fn compose_len_rdata<Target: Composer + ?Sized>( &self, target: &mut Target, ) -> Result<(), Target::AppendError>
Appends the record data prefixed with its length.
source§fn compose_canonical_len_rdata<Target: Composer + ?Sized>(
&self,
target: &mut Target,
) -> Result<(), Target::AppendError>
fn compose_canonical_len_rdata<Target: Composer + ?Sized>( &self, target: &mut Target, ) -> Result<(), Target::AppendError>
Appends the record data prefixed with its length.
source§impl<O, N> From<Cds<O>> for AllRecordData<O, N>
impl<O, N> From<Cds<O>> for AllRecordData<O, N>
source§impl<O, N> From<Cds<O>> for ZoneRecordData<O, N>
impl<O, N> From<Cds<O>> for ZoneRecordData<O, N>
source§impl<Octs, SrcOcts> OctetsFrom<Cds<SrcOcts>> for Cds<Octs>where
Octs: OctetsFrom<SrcOcts>,
impl<Octs, SrcOcts> OctetsFrom<Cds<SrcOcts>> for Cds<Octs>where
Octs: OctetsFrom<SrcOcts>,
type Error = <Octs as OctetsFrom<SrcOcts>>::Error
source§impl<Octs: AsRef<[u8]>> Ord for Cds<Octs>
impl<Octs: AsRef<[u8]>> Ord for Cds<Octs>
source§impl<'a, Octs> ParseRecordData<'a, Octs> for Cds<Octs::Range<'a>>
impl<'a, Octs> ParseRecordData<'a, Octs> for Cds<Octs::Range<'a>>
source§fn parse_rdata(
rtype: Rtype,
parser: &mut Parser<'a, Octs>,
) -> Result<Option<Self>, ParseError>
fn parse_rdata( rtype: Rtype, parser: &mut Parser<'a, Octs>, ) -> Result<Option<Self>, ParseError>
Parses the record data. Read more
source§impl<Octs, Other> PartialEq<Cds<Other>> for Cds<Octs>
impl<Octs, Other> PartialEq<Cds<Other>> for Cds<Octs>
source§impl<Octs, Other> PartialOrd<Cds<Other>> for Cds<Octs>
impl<Octs, Other> PartialOrd<Cds<Other>> for Cds<Octs>
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 moresource§impl<Octs> RecordData for Cds<Octs>
impl<Octs> RecordData for Cds<Octs>
impl<Octs: AsRef<[u8]>> Eq for Cds<Octs>
Auto Trait Implementations§
impl<Octs> Freeze for Cds<Octs>where
Octs: Freeze,
impl<Octs> RefUnwindSafe for Cds<Octs>where
Octs: RefUnwindSafe,
impl<Octs> Send for Cds<Octs>where
Octs: Send,
impl<Octs> Sync for Cds<Octs>where
Octs: Sync,
impl<Octs> Unpin for Cds<Octs>where
Octs: Unpin,
impl<Octs> UnwindSafe for Cds<Octs>where
Octs: 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>,
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.