Struct rustc_ast::tokenstream::TokenStream [−][src]
pub struct TokenStream(pub(crate) Lrc<Vec<TreeAndSpacing>>);
Expand description
A TokenStream
is an abstract sequence of tokens, organized into TokenTree
s.
The goal is for procedural macros to work with TokenStream
s and TokenTree
s
instead of a representation of the abstract syntax tree.
Today’s TokenTree
s can still contain AST via token::Interpolated
for
backwards compatibility.
Tuple Fields
0: Lrc<Vec<TreeAndSpacing>>
Implementations
pub fn into_trees(self) -> Cursorⓘ
Compares two TokenStream
s, checking equality without regarding span information.
Trait Implementations
Returns the “default value” for a type. Read more
Performs the conversion.
Creates a value from an iterator. Read more
Auto Trait Implementations
impl !RefUnwindSafe for TokenStream
impl !Send for TokenStream
impl !Sync for TokenStream
impl Unpin for TokenStream
impl !UnwindSafe for TokenStream
Blanket Implementations
Mutably borrows from an owned value. Read more
Layout
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 8 bytes