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

    // Provided method
    fn try_from_str(record_type: RecordType, s: &str) -> ParseResult<Self> { ... }
}
Available on crate feature text-parsing only.
Expand description

Extension on RData for text parsing

Required Methods§

source

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

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) -> ParseResult<Self>

Parse RData from a string

Object Safety§

This trait is not object safe.

Implementors§