pub struct LexSource<'t> { /* private fields */ }
Expand description

Structure to hold contents of a source (such as contents of file). A StrTokenizer can be created from such a struct. It reads the contents of a file using std::fs::read_to_string and stores it locally.

Implementations

creates a new LexSource struct with given source path, reads contents into struct using std::fs::read_to_string

retrieves entire contents of lexsource

retrieves original path (such as filename) of this source

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.