Struct hime_redist::tokens::Token

source ·
pub struct Token<'a> {
    pub index: usize,
    /* private fields */
}
Expand description

Represents a token as an output element of a lexer

Fields§

§index: usize

The index of this token in the text

Trait Implementations§

Implementation of Clone for Token

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more

Gets the position in the input text of this element

Gets the span in the input text of this element

Gets the context of this element in the input

Gets the grammar symbol associated to this element

Gets the value of this element, if any

Implementation of Copy for Token

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.