Enum rustc_parse::parser::FlatToken
source · pub enum FlatToken {
Token(Token),
AttrTarget(AttributesData),
Empty,
}
Expand description
A helper struct used when building an AttrTokenStream
from
a LazyAttrTokenStream
. Both delimiter and non-delimited tokens
are stored as FlatToken::Token
. A vector of FlatToken
s
is then ‘parsed’ to build up an AttrTokenStream
with nested
AttrTokenTree::Delimited
tokens.
Variants§
Token(Token)
A token - this holds both delimiter (e.g. ‘{’ and ‘}’) and non-delimiter tokens
AttrTarget(AttributesData)
Holds the AttributesData
for an AST node. The
AttributesData
is inserted directly into the
constructed AttrTokenStream
as
an AttrTokenTree::Attributes
.
Empty
A special ‘empty’ token that is ignored during the conversion
to an AttrTokenStream
. This is used to simplify the
handling of replace ranges.
Trait Implementations§
Auto Trait Implementations§
impl DynSend for FlatToken
impl DynSync for FlatToken
impl Freeze for FlatToken
impl !RefUnwindSafe for FlatToken
impl !Send for FlatToken
impl !Sync for FlatToken
impl Unpin for FlatToken
impl !UnwindSafe for FlatToken
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
source§impl<T, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
§impl<T> Filterable for T
impl<T> Filterable for T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
impl<'a, T> Captures<'a> for Twhere
T: ?Sized,
impl<T> ErasedDestructor for Twhere
T: 'static,
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: 24 bytes
Size for each variant:
Token
: 24 bytesAttrTarget
: 24 bytesEmpty
: 0 bytes