Trait trust_dns_client::serialize::txt::RDataParser
source · 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§
sourcefn parse<'i, I>(
record_type: RecordType,
tokens: I,
origin: Option<&Name>
) -> Result<Self, ParseError>
fn parse<'i, I>( record_type: RecordType, tokens: I, origin: Option<&Name> ) -> Result<Self, ParseError>
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) -> Result<Self, ParseError>
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.