Struct rune::Sources[][src]

pub struct Sources { /* fields omitted */ }
Expand description

A collection of source files, and a queue of things to compile.

Implementations

Construct a new collection of sources.

Get the source matching the given source id.

Insert a source to be built and return its id.

Fetch name for the given source id.

Fetch source for the given span.

Access the optional path of the given source id.

Trait Implementations

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

A unique identifier for files in the file provider. This will be used for rendering diagnostic::Labels in the corresponding source files. Read more

The user-facing name of a file, to be displayed in diagnostics.

The source code of a file.

The user-facing name of a file.

The source code of a file.

The index of the line at the given byte index. If the byte index is past the end of the file, returns the maximum line index in the file. This means that this function only fails if the file is not present. Read more

The byte range of line in the source of the file.

The user-facing line number at the given line index. It is not necessarily checked that the specified line index is actually in the file. Read more

The user-facing column number at the given line index and byte index. Read more

Convenience method for returning line and column number at the given byte index in the file. Read more

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

Performs the conversion.

Performs the conversion.

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.