Struct arret_compiler::SourceLoader [−][src]
pub struct SourceLoader { /* fields omitted */ }
Implementations
impl SourceLoader
[src]
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]
&self,
filename: OsString,
source: impl Into<SourceText>
) -> SourceFile
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]
impl Default for SourceLoader
[src]