[][src]Struct gluon_base::source::FileMap

pub struct FileMap { /* fields omitted */ }

Implementations

impl FileMap[src]

pub fn new(name: String, source: String) -> Self[src]

pub fn span(&self) -> Span<BytePos>[src]

pub fn source(&self) -> &str[src]

pub fn name(&self) -> &str[src]

Trait Implementations

impl Debug for FileMap[src]

impl<'a> Files<'a> for FileMap[src]

type FileId = ()

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

type Name = String

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

type Source = &'a str

The source code of a file.

impl Source for FileMap[src]

fn location(&self, byte: BytePos) -> Option<Location>[src]

Returns the line and column location of byte

fn comment_start_before(&self, end: BytePos) -> BytePos[src]

Returns the starting position of any comments and whitespace before end

Auto Trait Implementations

impl RefUnwindSafe for FileMap

impl Send for FileMap

impl Sync for FileMap

impl Unpin for FileMap

impl UnwindSafe for FileMap

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<Id> AsId<Id> for Id where
    Id: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.