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.

When record data types are generic – typically over a domain name type –, they may not in all cases be parseable. They may still represent record data to be used when constructing the message.

To reflect this asymmetry, parsing of record data has its own trait.

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 method 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 particual, 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<ParsedDname<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<ParsedDname<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<ParsedDname<Octs::Range<'a>>>
where Octs: Octets + ?Sized,

source§

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

source§

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

source§

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

source§

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

source§

impl<'a, Octs> ParseRecordData<'a, Octs> for Ns<ParsedDname<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<ParsedDname<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 ZoneRecordData<Octs::Range<'a>, ParsedDname<Octs::Range<'a>>>

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

impl<'a, Octs: Octets> ParseRecordData<'a, Octs> for AllRecordData<Octs::Range<'a>, ParsedDname<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