Struct deno_core::ExtModuleLoader
source · pub struct ExtModuleLoader { /* private fields */ }
Implementations§
source§impl ExtModuleLoader
impl ExtModuleLoader
pub fn new( module_loader: Option<Rc<dyn ModuleLoader>>, esm_sources: Vec<ExtensionFileSource>, maybe_load_callback: Option<ExtModuleLoaderCb> ) -> Self
Trait Implementations§
source§impl Default for ExtModuleLoader
impl Default for ExtModuleLoader
source§impl Drop for ExtModuleLoader
impl Drop for ExtModuleLoader
source§impl ModuleLoader for ExtModuleLoader
impl ModuleLoader for ExtModuleLoader
source§fn resolve(
&self,
specifier: &str,
referrer: &str,
kind: ResolutionKind
) -> Result<ModuleSpecifier, Error>
fn resolve( &self, specifier: &str, referrer: &str, kind: ResolutionKind ) -> Result<ModuleSpecifier, Error>
Returns an absolute URL.
When implementing an spec-complaint VM, this should be exactly the
algorithm described here:
https://html.spec.whatwg.org/multipage/webappapis.html#resolve-a-module-specifier Read more
source§fn load(
&self,
module_specifier: &ModuleSpecifier,
maybe_referrer: Option<&ModuleSpecifier>,
is_dyn_import: bool
) -> Pin<Box<ModuleSourceFuture>>
fn load( &self, module_specifier: &ModuleSpecifier, maybe_referrer: Option<&ModuleSpecifier>, is_dyn_import: bool ) -> Pin<Box<ModuleSourceFuture>>
Given ModuleSpecifier, load its source code. Read more
source§fn prepare_load(
&self,
op_state: Rc<RefCell<OpState>>,
module_specifier: &ModuleSpecifier,
maybe_referrer: Option<String>,
is_dyn_import: bool
) -> Pin<Box<dyn Future<Output = Result<(), Error>>>>
fn prepare_load( &self, op_state: Rc<RefCell<OpState>>, module_specifier: &ModuleSpecifier, maybe_referrer: Option<String>, is_dyn_import: bool ) -> Pin<Box<dyn Future<Output = Result<(), Error>>>>
This hook can be used by implementors to do some preparation
work before starting loading of modules. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for ExtModuleLoader
impl !Send for ExtModuleLoader
impl !Sync for ExtModuleLoader
impl Unpin for ExtModuleLoader
impl !UnwindSafe for ExtModuleLoader
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more