Struct hime_redist::text::Text

source ·
pub struct Text { /* private fields */ }
Expand description

Represents the input of parser with some metadata for line endings All line numbers and column numbers are 1-based. Indices in the content are 0-based.

Implementations§

Initializes this text

Initializes this text from a UTF-16 stream

Initializes this text from a UTF-8 stream

Gets the number of lines

Gets the size in number of characters

Gets whether the specified index is after the end of the text represented by this object

Gets the character at the specified index

Gets the substring beginning at the given index with the given length

Get the substring corresponding to the specified span

Gets the starting index of the i-th line

Gets the length of the i-th line

Gets the string content of the i-th line

Gets the position at the given index

Gets the context description for the current text at the specified position

Gets the context description for the current text at the specified position

Gets the context description for the current text at the specified span

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.