Struct arret_compiler::SourceLoader[][src]

pub struct SourceLoader { /* fields omitted */ }

Implementations

impl SourceLoader[src]

pub fn new() -> Self[src]

pub fn load_path(&self, path: &Path) -> Result<SourceFile, Error>[src]

Synchronously read path into a SourceFile

pub fn load_string(
    &self,
    filename: OsString,
    source: impl Into<SourceText>
) -> SourceFile
[src]

Loads a caller-provided string into a SourceFile

pub fn reserve(&self, additional: usize)[src]

Reserves space for additional more files

This can be used to avoid allocating memory under our instance’s write lock.

pub fn files(&self) -> ReportableFiles<'_>[src]

Returns a ReportableFiles instance usable with codespan-reporting

This will take our instance’s read lock.

Trait Implementations

impl Default for SourceLoader[src]

Auto Trait Implementations

impl RefUnwindSafe for SourceLoader

impl Send for SourceLoader

impl Sync for SourceLoader

impl Unpin for SourceLoader

impl UnwindSafe for SourceLoader

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?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.