Trait deno_graph::source::Loader [−][src]
pub trait Loader {
fn load(
&mut self,
specifier: &ModuleSpecifier,
is_dynamic: bool
) -> LoadFuture;
fn get_cache_info(&self, _specifier: &ModuleSpecifier) -> Option<CacheInfo> { ... }
}
Expand description
A trait which allows asynchronous loading of source files into a module graph in a thread safe way as well as a way to provide additional meta data about any cached resources.
Required methods
fn load(&mut self, specifier: &ModuleSpecifier, is_dynamic: bool) -> LoadFuture
fn load(&mut self, specifier: &ModuleSpecifier, is_dynamic: bool) -> LoadFuture
A method that given a specifier that asynchronously returns a response
Provided methods
fn get_cache_info(&self, _specifier: &ModuleSpecifier) -> Option<CacheInfo>
fn get_cache_info(&self, _specifier: &ModuleSpecifier) -> Option<CacheInfo>
An optional method which returns cache info for a module specifier.