Struct deno_utils::UniversalModuleLoader
source · [−]pub struct UniversalModuleLoader { /* private fields */ }
Implementations
sourceimpl UniversalModuleLoader
impl UniversalModuleLoader
pub fn new(module_store: Option<Arc<dyn ModuleStore>>, compile: bool) -> Self
pub async fn get_and_update_source(
self,
m: &ModuleSpecifier,
minify: bool
) -> Result<String, AnyError>
Trait Implementations
sourceimpl Clone for UniversalModuleLoader
impl Clone for UniversalModuleLoader
sourcefn clone(&self) -> UniversalModuleLoader
fn clone(&self) -> UniversalModuleLoader
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for UniversalModuleLoader
impl Debug for UniversalModuleLoader
sourceimpl Default for UniversalModuleLoader
impl Default for UniversalModuleLoader
sourceimpl ModuleLoader for UniversalModuleLoader
impl ModuleLoader for UniversalModuleLoader
sourcefn resolve(
&self,
specifier: &str,
referrer: &str,
_is_main: bool
) -> Result<ModuleSpecifier, AnyError>
fn resolve(
&self,
specifier: &str,
referrer: &str,
_is_main: bool
) -> Result<ModuleSpecifier, AnyError>
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
sourcefn 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
sourcefn prepare_load(
&self,
_op_state: Rc<RefCell<OpState>>,
_module_specifier: &Url,
_maybe_referrer: Option<String>,
_is_dyn_import: bool
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'static, Global>>
fn prepare_load(
&self,
_op_state: Rc<RefCell<OpState>>,
_module_specifier: &Url,
_maybe_referrer: Option<String>,
_is_dyn_import: bool
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'static, Global>>
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 UniversalModuleLoader
impl Send for UniversalModuleLoader
impl Sync for UniversalModuleLoader
impl Unpin for UniversalModuleLoader
impl !UnwindSafe for UniversalModuleLoader
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more