Struct codespan::FileMap [] [src]

pub struct FileMap<S = String> { /* fields omitted */ }

Some source code

Methods

impl<S> FileMap<S> where
    S: AsRef<str>, 
[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<S: Debug> Debug for FileMap<S>
[src]

[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<S> Send for FileMap<S> where
    S: Send

impl<S> Sync for FileMap<S> where
    S: Sync