pub enum TokenTree<S> {
Leaf(Leaf<S>),
Group(Group<S>),
}Variants§
Trait Implementations§
Source§impl<S: Copy> Extend<TokenTree<S>> for TokenStream<S>
impl<S: Copy> Extend<TokenTree<S>> for TokenStream<S>
Source§fn extend<T: IntoIterator<Item = TokenTree<S>>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = TokenTree<S>>>(&mut self, iter: T)
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: T)
fn extend_one(&mut self, item: T)
🔬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
Source§impl<S> FromIterator<TokenTree<S>> for TokenStream<S>
impl<S> FromIterator<TokenTree<S>> for TokenStream<S>
Auto Trait Implementations§
impl<S> !Send for TokenTree<S>
impl<S> !Sync for TokenTree<S>
impl<S> Freeze for TokenTree<S>where
S: Freeze,
impl<S> RefUnwindSafe for TokenTree<S>where
S: RefUnwindSafe,
impl<S> Unpin for TokenTree<S>where
S: Unpin,
impl<S> UnsafeUnpin for TokenTree<S>where
S: UnsafeUnpin,
impl<S> UnwindSafe for TokenTree<S>where
S: UnwindSafe + RefUnwindSafe,
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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