struct StringReader<'a> {
    sess: &'a ParseSess,
    start_pos: BytePos,
    pos: BytePos,
    src: &'a str,
    cursor: Cursor<'a>,
    override_span: Option<Span>,
}

Fields§

§sess: &'a ParseSess§start_pos: BytePos

Initial position, read-only.

§pos: BytePos

The absolute offset within the source_map of the current character.

§src: &'a str

Source text to tokenize.

§cursor: Cursor<'a>

Cursor for getting lexer tokens.

§override_span: Option<Span>

Implementations§

Returns the next token, paired with a bool indicating if the token was preceded by whitespace.

Report a fatal lexical error with a given span.

Report a lexical error with a given span.

Report a fatal error spanning [from_pos, to_pos).

Report a lexical error spanning [from_pos, to_pos).

Detect usages of Unicode codepoints changing the direction of the text on screen and loudly complain about it.

Slice of the source text from start up to but excluding self.pos, meaning the slice does not include the character self.ch.

As symbol_from, with an explicit endpoint.

Slice of the source text spanning from start up to but excluding end.

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 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.

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: 72 bytes