Struct rquickjs_core::Module [−][src]
pub struct Module<'js, S = Evaluated>(_, _);
Expand description
Javascript module with certain exports and imports
Implementations
Load module from bytecode
Load module from bytecode (static const)
Evaluate a loaded module
To get access to module exports it should be evaluated first, in particular when you create module manually via Module::new
.
Cast the specific loaded module to generic one
Return exported value by name
pub fn names<N>(&self) -> ExportNamesIter<'js, N>ⓘNotable traits for ExportNamesIter<'js, N>impl<'js, N> Iterator for ExportNamesIter<'js, N> where
N: FromAtom<'js>, type Item = Result<N>;
where
N: FromAtom<'js>,
This is supported on crate feature exports
only.
pub fn names<N>(&self) -> ExportNamesIter<'js, N>ⓘNotable traits for ExportNamesIter<'js, N>impl<'js, N> Iterator for ExportNamesIter<'js, N> where
N: FromAtom<'js>, type Item = Result<N>;
where
N: FromAtom<'js>,
Notable traits for ExportNamesIter<'js, N>
impl<'js, N> Iterator for ExportNamesIter<'js, N> where
N: FromAtom<'js>, type Item = Result<N>;
This is supported on crate feature
exports
only.Returns a iterator over the exported names of the module export.
pub fn entries<N, T>(&self) -> ExportEntriesIter<'js, N, T>ⓘNotable traits for ExportEntriesIter<'js, N, T>impl<'js, N, T> Iterator for ExportEntriesIter<'js, N, T> where
N: FromAtom<'js>,
T: FromJs<'js>, type Item = Result<(N, T)>;
where
N: FromAtom<'js>,
T: FromJs<'js>,
This is supported on crate feature exports
only.
pub fn entries<N, T>(&self) -> ExportEntriesIter<'js, N, T>ⓘNotable traits for ExportEntriesIter<'js, N, T>impl<'js, N, T> Iterator for ExportEntriesIter<'js, N, T> where
N: FromAtom<'js>,
T: FromJs<'js>, type Item = Result<(N, T)>;
where
N: FromAtom<'js>,
T: FromJs<'js>,
Notable traits for ExportEntriesIter<'js, N, T>
impl<'js, N, T> Iterator for ExportEntriesIter<'js, N, T> where
N: FromAtom<'js>,
T: FromJs<'js>, type Item = Result<(N, T)>;
This is supported on crate feature
exports
only.Returns a iterator over the items the module export.
Convert into value
Convert from value
Methods from Deref<Target = Value<'js>>
Check if the value is a function
Try reinterprete as
Trait Implementations
Auto Trait Implementations
impl<'js, S = Evaluated> !RefUnwindSafe for Module<'js, S>
impl<'js, S> UnwindSafe for Module<'js, S> where
S: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more