Skip to main content

SourceLoader

Trait SourceLoader 

Source
pub trait SourceLoader {
    // Required method
    fn load(
        &mut self,
        sources: &Sources,
        id: SourceId,
        item: &Item,
        span: &dyn Spanned,
    ) -> Result<Source>;
}
Expand description

A source loader.

Required Methods§

Source

fn load( &mut self, sources: &Sources, id: SourceId, item: &Item, span: &dyn Spanned, ) -> Result<Source>

Load the given URL.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl SourceLoader for FileSourceLoader

Available on crate feature std only.
Source§

impl SourceLoader for NoopSourceLoader