pub trait RDataParser: Sized {
    // Required method
    fn parse<'i, I>(
        record_type: RecordType,
        tokens: I,
        origin: Option<&Name>
    ) -> Result<Self, ParseError>
       where I: Iterator<Item = &'i str>;

    // Provided method
    fn try_from_str(
        record_type: RecordType,
        s: &str
    ) -> Result<Self, ParseError> { ... }
}
Expand description

Extension on RData for text parsing

Required Methods§

source

fn parse<'i, I>( record_type: RecordType, tokens: I, origin: Option<&Name> ) -> Result<Self, ParseError>
where I: Iterator<Item = &'i str>,

Attempts to parse a stream of tokenized strs into the RData of the specified record type

Provided Methods§

source

fn try_from_str(record_type: RecordType, s: &str) -> Result<Self, ParseError>

Parse RData from a string

Object Safety§

This trait is not object safe.

Implementors§