Struct ucglib::tokenizer::TokenIter
[−]
[src]
pub struct TokenIter<'a> { pub source: &'a [Token], }
TokenIter wraps a slice of Tokens and implements the various necessary nom traits to use it as an input to nom parsers.
Fields
source: &'a [Token]
Methods
impl<'a> TokenIter<'a>
[src]
Trait Implementations
impl<'a> Clone for TokenIter<'a>
[src]
fn clone(&self) -> TokenIter<'a>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<'a> Debug for TokenIter<'a>
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<'a> PartialEq for TokenIter<'a>
[src]
fn eq(&self, __arg_0: &TokenIter<'a>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &TokenIter<'a>) -> bool
[src]
This method tests for !=
.
impl<'a> InputLength for TokenIter<'a>
[src]
fn input_len(&self) -> usize
[src]
calculates the input length, as indicated by its name, and the name of the trait itself Read more
impl<'a> Slice<Range<usize>> for TokenIter<'a>
[src]
impl<'a> Slice<RangeTo<usize>> for TokenIter<'a>
[src]
impl<'a> Slice<RangeFrom<usize>> for TokenIter<'a>
[src]
impl<'a> Slice<RangeFull> for TokenIter<'a>
[src]
impl<'a> Index<usize> for TokenIter<'a>
[src]
type Output = Token
The returned type after indexing.
fn index(&self, i: usize) -> &Self::Output
[src]
Performs the indexing (container[index]
) operation.
impl<'a> InputIter for TokenIter<'a>
[src]
type Item = &'a Token
type RawItem = Token
type Iter = Enumerate<Iter<'a, Self::RawItem>>
type IterElem = Iter<'a, Self::RawItem>
fn iter_indices(&self) -> Self::Iter
[src]
returns an iterator over the elements and their byte offsets
fn iter_elements(&self) -> Self::IterElem
[src]
returns an iterator over the elements
fn position<P>(&self, predicate: P) -> Option<usize> where
P: Fn(Self::RawItem) -> bool,
[src]
P: Fn(Self::RawItem) -> bool,
finds the byte position of the element
fn slice_index(&self, count: usize) -> Option<usize>
[src]
get the byte offset from the element's position in the stream