Trait domain::base::rdata::ParseRecordData

source ·
pub trait ParseRecordData<'a, Octs: ?Sized>: RecordData + Sized {
    // Required method
    fn parse_rdata(
        rtype: Rtype,
        parser: &mut Parser<'a, Octs>,
    ) -> Result<Option<Self>, ParseError>;
}
Expand description

A record data type that can be parsed from a message.

This trait allows a record data type to express whether it is able to parse record data for a specific record type. It is thus implemented by all record data types included in the rdata module.

Required Methods§

source

fn parse_rdata( rtype: Rtype, parser: &mut Parser<'a, Octs>, ) -> Result<Option<Self>, ParseError>

Parses the record data.

The record data is for a record of type rtype. The function may decide whether it wants to parse data for that type. It should return Ok(None) if it doesn’t.

The parser is positioned at the beginning of the record data and is is limited to the length of the data. The function only needs to parse as much data as it needs. The caller has to make sure to deal with data remaining in the parser.

If the function doesn’t want to process the data, it must not touch the parser. In particular, it must not advance it.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<'a, Octs> ParseRecordData<'a, Octs> for Cdnskey<Octs::Range<'a>>
where Octs: Octets + ?Sized,

source§

impl<'a, Octs> ParseRecordData<'a, Octs> for Cds<Octs::Range<'a>>
where Octs: Octets + ?Sized,

source§

impl<'a, Octs> ParseRecordData<'a, Octs> for Dname<ParsedName<Octs::Range<'a>>>
where Octs: Octets + ?Sized,

source§

impl<'a, Octs> ParseRecordData<'a, Octs> for Dnskey<Octs::Range<'a>>
where Octs: Octets + ?Sized,

source§

impl<'a, Octs> ParseRecordData<'a, Octs> for Ds<Octs::Range<'a>>
where Octs: Octets + ?Sized,

source§

impl<'a, Octs> ParseRecordData<'a, Octs> for Nsec3<Octs::Range<'a>>
where Octs: Octets + ?Sized,

source§

impl<'a, Octs> ParseRecordData<'a, Octs> for Nsec3param<Octs::Range<'a>>
where Octs: Octets + ?Sized,

source§

impl<'a, Octs> ParseRecordData<'a, Octs> for Cname<ParsedName<Octs::Range<'a>>>
where Octs: Octets + ?Sized,

source§

impl<'a, Octs> ParseRecordData<'a, Octs> for Hinfo<Octs::Range<'a>>
where Octs: Octets + ?Sized,

source§

impl<'a, Octs> ParseRecordData<'a, Octs> for Mb<ParsedName<Octs::Range<'a>>>
where Octs: Octets + ?Sized,

source§

impl<'a, Octs> ParseRecordData<'a, Octs> for Md<ParsedName<Octs::Range<'a>>>
where Octs: Octets + ?Sized,

source§

impl<'a, Octs> ParseRecordData<'a, Octs> for Mf<ParsedName<Octs::Range<'a>>>
where Octs: Octets + ?Sized,

source§

impl<'a, Octs> ParseRecordData<'a, Octs> for Mg<ParsedName<Octs::Range<'a>>>
where Octs: Octets + ?Sized,

source§

impl<'a, Octs> ParseRecordData<'a, Octs> for Mr<ParsedName<Octs::Range<'a>>>
where Octs: Octets + ?Sized,

source§

impl<'a, Octs> ParseRecordData<'a, Octs> for Ns<ParsedName<Octs::Range<'a>>>
where Octs: Octets + ?Sized,

source§

impl<'a, Octs> ParseRecordData<'a, Octs> for Null<Octs::Range<'a>>
where Octs: Octets + ?Sized,

source§

impl<'a, Octs> ParseRecordData<'a, Octs> for Ptr<ParsedName<Octs::Range<'a>>>
where Octs: Octets + ?Sized,

source§

impl<'a, Octs> ParseRecordData<'a, Octs> for Txt<Octs::Range<'a>>
where Octs: Octets + ?Sized,

source§

impl<'a, Octs> ParseRecordData<'a, Octs> for Opt<Octs::Range<'a>>
where Octs: Octets + ?Sized,

source§

impl<'a, Octs: Octets + ?Sized> ParseRecordData<'a, Octs> for AllRecordData<Octs::Range<'a>, ParsedName<Octs::Range<'a>>>

source§

impl<'a, Octs: Octets + ?Sized> ParseRecordData<'a, Octs> for ZoneRecordData<Octs::Range<'a>, ParsedName<Octs::Range<'a>>>

source§

impl<'a, Octs: Octets + ?Sized> ParseRecordData<'a, Octs> for Nsec<Octs::Range<'a>, ParsedName<Octs::Range<'a>>>

source§

impl<'a, Octs: Octets + ?Sized> ParseRecordData<'a, Octs> for Rrsig<Octs::Range<'a>, ParsedName<Octs::Range<'a>>>

source§

impl<'a, Octs: Octets + ?Sized> ParseRecordData<'a, Octs> for Minfo<ParsedName<Octs::Range<'a>>>

source§

impl<'a, Octs: Octets + ?Sized> ParseRecordData<'a, Octs> for Mx<ParsedName<Octs::Range<'a>>>

source§

impl<'a, Octs: Octets + ?Sized> ParseRecordData<'a, Octs> for Soa<ParsedName<Octs::Range<'a>>>

source§

impl<'a, Octs: Octets + ?Sized> ParseRecordData<'a, Octs> for Srv<ParsedName<Octs::Range<'a>>>

source§

impl<'a, Octs: Octets + ?Sized> ParseRecordData<'a, Octs> for SvcbRdata<HttpsVariant, Octs::Range<'a>, ParsedName<Octs::Range<'a>>>

source§

impl<'a, Octs: Octets + ?Sized> ParseRecordData<'a, Octs> for SvcbRdata<SvcbVariant, Octs::Range<'a>, ParsedName<Octs::Range<'a>>>

source§

impl<'a, Octs: Octets + ?Sized> ParseRecordData<'a, Octs> for Tsig<Octs::Range<'a>, ParsedName<Octs::Range<'a>>>

source§

impl<'a, Octs: Octets + ?Sized> ParseRecordData<'a, Octs> for UnknownRecordData<Octs::Range<'a>>

source§

impl<'a, Octs: AsRef<[u8]> + ?Sized> ParseRecordData<'a, Octs> for Aaaa

source§

impl<'a, Octs: AsRef<[u8]> + ?Sized> ParseRecordData<'a, Octs> for A