pub struct Tokens<'a> {
pub tok: &'a [Token],
pub start: usize,
pub end: usize,
}
Fields§
§tok: &'a [Token]
§start: usize
§end: usize
Implementations§
Trait Implementations§
Source§impl<'a> InputIter for Tokens<'a>
impl<'a> InputIter for Tokens<'a>
Source§type Iter = Enumerate<Iter<'a, Token>>
type Iter = Enumerate<Iter<'a, Token>>
An iterator over the input type, producing the item and its position
for use with Slice. If we’re iterating over
&str
, the position
corresponds to the byte index of the characterSource§fn iter_indices(&self) -> Enumerate<Iter<'a, Token>>
fn iter_indices(&self) -> Enumerate<Iter<'a, Token>>
Returns an iterator over the elements and their byte offsets
Source§fn iter_elements(&self) -> Iter<'a, Token>
fn iter_elements(&self) -> Iter<'a, Token>
Returns an iterator over the elements
Source§impl<'a> InputLength for Tokens<'a>
impl<'a> InputLength for Tokens<'a>
impl<'a> Copy for Tokens<'a>
impl<'a> Eq for Tokens<'a>
impl<'a> StructuralPartialEq for Tokens<'a>
impl<'a> UnspecializedInput for Tokens<'a>
Auto Trait Implementations§
impl<'a> Freeze for Tokens<'a>
impl<'a> RefUnwindSafe for Tokens<'a>
impl<'a> Send for Tokens<'a>
impl<'a> Sync for Tokens<'a>
impl<'a> Unpin for Tokens<'a>
impl<'a> UnwindSafe for Tokens<'a>
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<T> InputTakeAtPosition for T
impl<T> InputTakeAtPosition for T
Source§type Item = <T as InputIter>::Item
type Item = <T as InputIter>::Item
The current input type is a sequence of that
Item
type. Read moreSource§fn split_at_position<P, E>(&self, predicate: P) -> Result<(T, T), Err<E>>
fn split_at_position<P, E>(&self, predicate: P) -> Result<(T, T), Err<E>>
Looks for the first element of the input type for which the condition returns true,
and returns the input up to this position. Read more
Source§fn split_at_position1<P, E>(
&self,
predicate: P,
e: ErrorKind,
) -> Result<(T, T), Err<E>>
fn split_at_position1<P, E>( &self, predicate: P, e: ErrorKind, ) -> Result<(T, T), Err<E>>
Looks for the first element of the input type for which the condition returns true
and returns the input up to this position. Read more
Source§fn split_at_position_complete<P, E>(
&self,
predicate: P,
) -> Result<(T, T), Err<E>>
fn split_at_position_complete<P, E>( &self, predicate: P, ) -> Result<(T, T), Err<E>>
Looks for the first element of the input type for which the condition returns true,
and returns the input up to this position. Read more