Struct domain::base::scan::IterScanner
source · pub struct IterScanner<Iter: Iterator, Octets> { /* private fields */ }
Expand description
A simple scanner atop an iterator of strings.
The type is generic over the iterator as well as the octets sequence to use for returned data. The types associated octets builder is used to create values.
Implementations§
source§impl<Iter: Iterator, Octets> IterScanner<Iter, Octets>
impl<Iter: Iterator, Octets> IterScanner<Iter, Octets>
sourcepub fn new<I: IntoIterator<IntoIter = Iter>>(iter: I) -> Self
pub fn new<I: IntoIterator<IntoIter = Iter>>(iter: I) -> Self
Creates a new scanner from an iterator.
sourcepub fn is_exhausted(&mut self) -> bool
pub fn is_exhausted(&mut self) -> bool
Returns whether the iterator is exhausted.
Trait Implementations§
source§impl<Iter, Item, Octets> Scanner for IterScanner<Iter, Octets>where
Item: AsRef<str>,
Iter: Iterator<Item = Item>,
Octets: FromBuilder,
<Octets as FromBuilder>::Builder: EmptyBuilder + Composer,
impl<Iter, Item, Octets> Scanner for IterScanner<Iter, Octets>where
Item: AsRef<str>,
Iter: Iterator<Item = Item>,
Octets: FromBuilder,
<Octets as FromBuilder>::Builder: EmptyBuilder + Composer,
§type OctetsBuilder = <Octets as FromBuilder>::Builder
type OctetsBuilder = <Octets as FromBuilder>::Builder
The octets builder used internally and returned upon request.
source§fn scan_symbols<F>(&mut self, op: F) -> Result<(), Self::Error>
fn scan_symbols<F>(&mut self, op: F) -> Result<(), Self::Error>
Scans a token into a sequence of symbols. Read more
source§fn scan_entry_symbols<F>(&mut self, op: F) -> Result<(), Self::Error>
fn scan_entry_symbols<F>(&mut self, op: F) -> Result<(), Self::Error>
Scans the remainder of the entry as symbols. Read more
source§fn convert_token<C: ConvertSymbols<Symbol, Self::Error>>(
&mut self,
convert: C,
) -> Result<Self::Octets, Self::Error>
fn convert_token<C: ConvertSymbols<Symbol, Self::Error>>( &mut self, convert: C, ) -> Result<Self::Octets, Self::Error>
Converts the symbols of a token into an octets sequence. Read more
source§fn convert_entry<C: ConvertSymbols<EntrySymbol, Self::Error>>(
&mut self,
convert: C,
) -> Result<Self::Octets, Self::Error>
fn convert_entry<C: ConvertSymbols<EntrySymbol, Self::Error>>( &mut self, convert: C, ) -> Result<Self::Octets, Self::Error>
Converts the symbols of a token into an octets sequence. Read more
source§fn scan_octets(&mut self) -> Result<Self::Octets, Self::Error>
fn scan_octets(&mut self) -> Result<Self::Octets, Self::Error>
Scans a token into an octets sequence. Read more
source§fn scan_ascii_str<F, T>(&mut self, op: F) -> Result<T, Self::Error>
fn scan_ascii_str<F, T>(&mut self, op: F) -> Result<T, Self::Error>
Scans a token as a borrowed ASCII string. Read more
source§fn scan_dname(&mut self) -> Result<Self::Dname, Self::Error>
fn scan_dname(&mut self) -> Result<Self::Dname, Self::Error>
Scans a token into a domain name.
source§fn scan_charstr(&mut self) -> Result<CharStr<Self::Octets>, Self::Error>
fn scan_charstr(&mut self) -> Result<CharStr<Self::Octets>, Self::Error>
Scans a token into a character string. Read more
source§fn scan_string(&mut self) -> Result<Str<Self::Octets>, Self::Error>
fn scan_string(&mut self) -> Result<Str<Self::Octets>, Self::Error>
Scans a token as a UTF-8 string.
source§fn scan_charstr_entry(&mut self) -> Result<Self::Octets, Self::Error>
fn scan_charstr_entry(&mut self) -> Result<Self::Octets, Self::Error>
Scans a sequence of character strings until the end of the entry. Read more
source§fn scan_opt_unknown_marker(&mut self) -> Result<bool, Self::Error>
fn scan_opt_unknown_marker(&mut self) -> Result<bool, Self::Error>
Scans an optional unknown rdata marker. Read more
source§fn octets_builder(&mut self) -> Result<Self::OctetsBuilder, Self::Error>
fn octets_builder(&mut self) -> Result<Self::OctetsBuilder, Self::Error>
Returns an empty octets builder. Read more
Auto Trait Implementations§
impl<Iter, Octets> Freeze for IterScanner<Iter, Octets>
impl<Iter, Octets> RefUnwindSafe for IterScanner<Iter, Octets>
impl<Iter, Octets> Send for IterScanner<Iter, Octets>
impl<Iter, Octets> Sync for IterScanner<Iter, Octets>
impl<Iter, Octets> Unpin for IterScanner<Iter, Octets>
impl<Iter, Octets> UnwindSafe for IterScanner<Iter, Octets>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
impl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
type Error = <Target as OctetsFrom<Source>>::Error
source§fn try_octets_into(
self,
) -> Result<Target, <Source as OctetsInto<Target>>::Error>
fn try_octets_into( self, ) -> Result<Target, <Source as OctetsInto<Target>>::Error>
Performs the conversion.
source§fn octets_into(self) -> Target
fn octets_into(self) -> Target
Performs an infallible conversion.