pub struct PpToken {
pub kind: PpTokenKind,
pub flags: TokenFlags,
pub value: Option<Symbol>,
pub span: Span,
}Expand description
One preprocessing token.
Sixteen bytes, which spec/05-preprocessor.md section 5.2 asks for, and there is a test
below that says so. The size is not vanity: a large translation unit is tens of millions
of these and they are walked repeatedly by the macro expander.
Fields§
§kind: PpTokenKindThe category.
flags: TokenFlagsFacts about the token that its bytes do not carry.
value: Option<Symbol>The spelling, interned, for the categories that have one. None for punctuators,
whose spelling is recoverable from the kind, and for end of file.
span: SpanWhere the token sits in the source, in real file bytes.
Implementations§
Trait Implementations§
impl Copy for PpToken
impl Eq for PpToken
impl StructuralPartialEq for PpToken
Auto Trait Implementations§
impl Freeze for PpToken
impl RefUnwindSafe for PpToken
impl Send for PpToken
impl Sync for PpToken
impl Unpin for PpToken
impl UnsafeUnpin for PpToken
impl UnwindSafe for PpToken
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