Struct rquickjs::loader::ModuleLoader
source · pub struct ModuleLoader { /* private fields */ }
Available on crate feature
loader
only.Expand description
The builtin native module loader
This loader can be used as the nested backing loader in user-defined loaders.
Implementations§
source§impl ModuleLoader
impl ModuleLoader
sourcepub fn add_module<N, M>(&mut self, name: N, _module: M) -> &mut ModuleLoader
pub fn add_module<N, M>(&mut self, name: N, _module: M) -> &mut ModuleLoader
Add module
sourcepub fn with_module<N, M>(self, name: N, module: M) -> ModuleLoader
pub fn with_module<N, M>(self, name: N, module: M) -> ModuleLoader
Add module
Trait Implementations§
source§impl Debug for ModuleLoader
impl Debug for ModuleLoader
source§impl Default for ModuleLoader
impl Default for ModuleLoader
source§fn default() -> ModuleLoader
fn default() -> ModuleLoader
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ModuleLoader
impl RefUnwindSafe for ModuleLoader
impl Send for ModuleLoader
impl Sync for ModuleLoader
impl Unpin for ModuleLoader
impl UnwindSafe for ModuleLoader
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
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more