Struct codespan::FileMap [] [src]

pub struct FileMap { /* fields omitted */ }

Some source code

Methods

impl FileMap
[src]

[src]

Construct a new, standalone filemap.

This can be useful for tests that consist of a single source file. Production code should however use CodeMap::add_filemap or CodeMap::add_filemap_from_disk instead.

[src]

The name of the file that the source came from

[src]

The underlying source code

[src]

The span of the source in the CodeMap

[src]

[src]

[src]

Returns the byte offset to the start of line

[src]

Returns the byte index of the start of line

[src]

Returns the byte offset to the start of line

[src]

Returns the line and column location of byte

[src]

Returns the line index that the byte index points to

[src]

Get the corresponding source string for a span

Returns Err if the span is outside the bounds of the file

Trait Implementations

impl Debug for FileMap
[src]

[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for FileMap

impl Sync for FileMap