pub struct Token<T, Idx> {
pub span: Span<Idx>,
pub kind: T,
}
Fields§
§span: Span<Idx>
§kind: T
Trait Implementations§
Source§impl<T, TokErr, Idx: Default + Clone, P: Parser<T>> Extend<Token<T, Idx>> for ParseState<T, TokErr, Idx, P>
impl<T, TokErr, Idx: Default + Clone, P: Parser<T>> Extend<Token<T, Idx>> for ParseState<T, TokErr, Idx, P>
Source§fn extend<I>(&mut self, iter: I)where
I: IntoIterator<Item = Token<T, Idx>>,
fn extend<I>(&mut self, iter: I)where
I: IntoIterator<Item = Token<T, Idx>>,
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
impl<T: Copy, Idx: Copy> Copy for Token<T, Idx>
impl<T: Eq, Idx: Eq> Eq for Token<T, Idx>
impl<T, Idx> StructuralPartialEq for Token<T, Idx>
Auto Trait Implementations§
impl<T, Idx> Freeze for Token<T, Idx>
impl<T, Idx> RefUnwindSafe for Token<T, Idx>where
T: RefUnwindSafe,
Idx: RefUnwindSafe,
impl<T, Idx> Send for Token<T, Idx>
impl<T, Idx> Sync for Token<T, Idx>
impl<T, Idx> Unpin for Token<T, Idx>
impl<T, Idx> UnwindSafe for Token<T, Idx>where
T: UnwindSafe,
Idx: UnwindSafe,
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more