[][src]Struct gluon_base::source::CodeMap

pub struct CodeMap { /* fields omitted */ }

Implementations

impl CodeMap[src]

pub fn new() -> Self[src]

pub fn add_filemap(&mut self, filename: String, source: String) -> Arc<FileMap>[src]

pub fn to_usize(&self, pos: BytePos) -> Option<usize>[src]

pub fn find_file(&self, file: &str) -> Option<&Arc<FileMap>>[src]

pub fn get(&self, file_id: FileId) -> Option<&Arc<FileMap>>[src]

pub fn update(&mut self, index: BytePos, src: String) -> Option<Arc<FileMap>>[src]

Trait Implementations

impl Clone for CodeMap[src]

impl Debug for CodeMap[src]

impl Default for CodeMap[src]

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

type FileId = 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.

Auto Trait Implementations

impl RefUnwindSafe for CodeMap

impl Send for CodeMap

impl Sync for CodeMap

impl Unpin for CodeMap

impl UnwindSafe for CodeMap

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.