Struct logos_nom_bridge::Tokens
source · [−]pub struct Tokens<'i, T> where
T: Logos<'i>, { /* private fields */ }
Expand description
A logos::Lexer
wrapper than can be used as an input for
nom.
You can find an example in the module-level docs.
Implementations
sourceimpl<'i, T> Tokens<'i, T> where
T: Logos<'i, Source = str> + Clone,
T::Extras: Default + Clone,
impl<'i, T> Tokens<'i, T> where
T: Logos<'i, Source = str> + Clone,
T::Extras: Default + Clone,
Trait Implementations
sourceimpl<'i, T> InputIter for Tokens<'i, T> where
T: Logos<'i, Source = str> + Clone,
T::Extras: Default + Clone,
impl<'i, T> InputIter for Tokens<'i, T> where
T: Logos<'i, Source = str> + Clone,
T::Extras: Default + Clone,
type Iter = IndexIterator<'i, T>
type Iter = IndexIterator<'i, T>
type IterElem = SpannedIter<'i, T>
type IterElem = SpannedIter<'i, T>
An iterator over the input type, producing the item
sourcefn iter_indices(&self) -> Self::Iter
fn iter_indices(&self) -> Self::Iter
Returns an iterator over the elements and their byte offsets
sourcefn iter_elements(&self) -> Self::IterElem
fn iter_elements(&self) -> Self::IterElem
Returns an iterator over the elements
sourceimpl<'i, T> InputLength for Tokens<'i, T> where
T: Logos<'i, Source = str> + Clone,
T::Extras: Default + Clone,
impl<'i, T> InputLength for Tokens<'i, T> where
T: Logos<'i, Source = str> + Clone,
T::Extras: Default + Clone,
sourceimpl<'i, T> PartialEq<Tokens<'i, T>> for Tokens<'i, T> where
T: PartialEq + Logos<'i> + Clone,
T::Extras: Clone,
impl<'i, T> PartialEq<Tokens<'i, T>> for Tokens<'i, T> where
T: PartialEq + Logos<'i> + Clone,
T::Extras: Clone,
impl<'i, T> Eq for Tokens<'i, T> where
T: Eq + Logos<'i> + Clone,
T::Extras: Clone,
Auto Trait Implementations
impl<'i, T> RefUnwindSafe for Tokens<'i, T> where
T: RefUnwindSafe,
<T as Logos<'i>>::Extras: RefUnwindSafe,
<T as Logos<'i>>::Source: RefUnwindSafe,
impl<'i, T> Send for Tokens<'i, T> where
T: Send,
<T as Logos<'i>>::Extras: Send,
<T as Logos<'i>>::Source: Sync,
impl<'i, T> Sync for Tokens<'i, T> where
T: Sync,
<T as Logos<'i>>::Extras: Sync,
<T as Logos<'i>>::Source: Sync,
impl<'i, T> Unpin for Tokens<'i, T> where
T: Unpin,
<T as Logos<'i>>::Extras: Unpin,
impl<'i, T> UnwindSafe for Tokens<'i, T> where
T: UnwindSafe,
<T as Logos<'i>>::Extras: UnwindSafe,
<T as Logos<'i>>::Source: RefUnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more