Trait hickory_proto::serialize::txt::RDataParser
source · 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§
sourcefn parse<'i, I: Iterator<Item = &'i str>>(
record_type: RecordType,
tokens: I,
origin: Option<&Name>
) -> ParseResult<Self>
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§
sourcefn try_from_str(record_type: RecordType, s: &str) -> ParseResult<Self>
fn try_from_str(record_type: RecordType, s: &str) -> ParseResult<Self>
Parse RData from a string
Object Safety§
This trait is not object safe.