pub enum TokenTree<TokenStream, Span, Symbol> {
    Group(Group<TokenStream, Span>),
    Punct(Punct<Span>),
    Ident(Ident<Span, Symbol>),
    Literal(Literal<Span, Symbol>),
}
🔬This is a nightly-only experimental API. (proc_macro_internals #27812)

Variants§

§

Group(Group<TokenStream, Span>)

🔬This is a nightly-only experimental API. (proc_macro_internals #27812)
§

Punct(Punct<Span>)

🔬This is a nightly-only experimental API. (proc_macro_internals #27812)
§

Ident(Ident<Span, Symbol>)

🔬This is a nightly-only experimental API. (proc_macro_internals #27812)
§

Literal(Literal<Span, Symbol>)

🔬This is a nightly-only experimental API. (proc_macro_internals #27812)

Trait Implementations§

source§

impl<TokenStream: Clone, Span: Clone, Symbol: Clone> Clone for TokenTree<TokenStream, Span, Symbol>

source§

fn clone(&self) -> TokenTree<TokenStream, Span, Symbol>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'a, S, TokenStream: for<'s> DecodeMut<'a, 's, S>, Span: for<'s> DecodeMut<'a, 's, S>, Symbol: for<'s> DecodeMut<'a, 's, S>> DecodeMut<'a, '_, S> for TokenTree<TokenStream, Span, Symbol>

source§

fn decode(r: &mut &'a [u8], s: &mut S) -> Self

🔬This is a nightly-only experimental API. (proc_macro_internals #27812)
source§

impl<S, TokenStream: Encode<S>, Span: Encode<S>, Symbol: Encode<S>> Encode<S> for TokenTree<TokenStream, Span, Symbol>

source§

fn encode(self, w: &mut Buffer, s: &mut S)

🔬This is a nightly-only experimental API. (proc_macro_internals #27812)
source§

impl<TokenStream: Mark, Span: Mark, Symbol: Mark> Mark for TokenTree<TokenStream, Span, Symbol>

§

type Unmarked = TokenTree<<TokenStream as Mark>::Unmarked, <Span as Mark>::Unmarked, <Symbol as Mark>::Unmarked>

🔬This is a nightly-only experimental API. (proc_macro_internals #27812)
source§

fn mark(unmarked: Self::Unmarked) -> Self

🔬This is a nightly-only experimental API. (proc_macro_internals #27812)
source§

impl<TokenStream: Unmark, Span: Unmark, Symbol: Unmark> Unmark for TokenTree<TokenStream, Span, Symbol>

§

type Unmarked = TokenTree<<TokenStream as Unmark>::Unmarked, <Span as Unmark>::Unmarked, <Symbol as Unmark>::Unmarked>

🔬This is a nightly-only experimental API. (proc_macro_internals #27812)
source§

fn unmark(self) -> Self::Unmarked

🔬This is a nightly-only experimental API. (proc_macro_internals #27812)

Auto Trait Implementations§

§

impl<TokenStream, Span, Symbol> RefUnwindSafe for TokenTree<TokenStream, Span, Symbol>where Span: RefUnwindSafe, Symbol: RefUnwindSafe, TokenStream: RefUnwindSafe,

§

impl<TokenStream, Span, Symbol> Send for TokenTree<TokenStream, Span, Symbol>where Span: Send, Symbol: Send, TokenStream: Send,

§

impl<TokenStream, Span, Symbol> Sync for TokenTree<TokenStream, Span, Symbol>where Span: Sync, Symbol: Sync, TokenStream: Sync,

§

impl<TokenStream, Span, Symbol> Unpin for TokenTree<TokenStream, Span, Symbol>where Span: Unpin, Symbol: Unpin, TokenStream: Unpin,

§

impl<TokenStream, Span, Symbol> UnwindSafe for TokenTree<TokenStream, Span, Symbol>where Span: UnwindSafe, Symbol: UnwindSafe, TokenStream: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.