Enum syntax::ext::tt::quoted::TokenTree
[−]
[src]
pub enum TokenTree {
Token(Span, Token),
Delimited(Span, Rc<Delimited>),
Sequence(Span, Rc<SequenceRepetition>),
MetaVarDecl(Span, Ident, Ident),
}🔬 This is a nightly-only experimental API. (
rustc_private)Similar to tokenstream::TokenTree, except that $i, $i:ident, and $(...)
are "first-class" token trees.
Variants
Token(Span, Token)🔬 This is a nightly-only experimental API. (
rustc_private)Delimited(Span, Rc<Delimited>)🔬 This is a nightly-only experimental API. (
rustc_private)Sequence(Span, Rc<SequenceRepetition>)🔬 This is a nightly-only experimental API. (
rustc_private)A kleene-style repetition sequence with a span
MetaVarDecl(Span, Ident, Ident)🔬 This is a nightly-only experimental API. (
rustc_private)Matches a nonterminal. This is only used in the left hand side of MBE macros.
Methods
impl TokenTree[src]
fn len(&self) -> usize
🔬 This is a nightly-only experimental API. (
rustc_private)fn get_tt(&self, index: usize) -> TokenTree
🔬 This is a nightly-only experimental API. (
rustc_private)fn span(&self) -> Span
🔬 This is a nightly-only experimental API. (
rustc_private)Retrieve the TokenTree's span.
Trait Implementations
impl Debug for TokenTree[src]
impl Clone for TokenTree[src]
fn clone(&self) -> TokenTree
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0
Performs copy-assignment from source. Read more
impl PartialEq for TokenTree[src]
fn eq(&self, __arg_0: &TokenTree) -> bool
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, __arg_0: &TokenTree) -> bool
This method tests for !=.
impl Eq for TokenTree[src]
impl Encodable for TokenTree[src]
fn encode<__S: Encoder>(&self, __arg_0: &mut __S) -> Result<(), __S::Error>
🔬 This is a nightly-only experimental API. (rustc_private)
deprecated in favor of rustc-serialize on crates.io
impl Decodable for TokenTree[src]
fn decode<__D: Decoder>(__arg_0: &mut __D) -> Result<TokenTree, __D::Error>
🔬 This is a nightly-only experimental API. (rustc_private)
deprecated in favor of rustc-serialize on crates.io
impl Hash for TokenTree[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
Feeds this value into the state given, updating the hasher as necessary.
fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher1.3.0
Feeds a slice of this type into the state provided.