[−][src]Struct rusty_v8::Module
A compiled JavaScript module.
Methods
impl Module
[src]
pub fn get_status(&self) -> ModuleStatus
[src]
Returns the module's current status.
pub fn get_exception(&self) -> Local<Value>
[src]
For a module in kErrored status, this returns the corresponding exception.
pub fn get_module_requests_length(&self) -> usize
[src]
Returns the number of modules requested by this module.
pub fn get_module_request(&self, i: usize) -> Local<String>
[src]
Returns the ith module specifier in this module. i must be < self.get_module_requests_length() and >= 0.
pub fn get_module_request_location(&self, i: usize) -> Location
[src]
Returns the source location (line number and column number) of the ith module specifier's first occurrence in this module.
pub fn get_identity_hash(&self) -> int
[src]
Returns the identity hash for this object.
pub fn get_module_namespace(&mut self) -> Local<Value>
[src]
Returns the identity hash for this object.
#[must_use]
pub fn instantiate_module(
&mut self,
context: Local<Context>,
callback: ResolveCallback
) -> Option<bool>
[src]
&mut self,
context: Local<Context>,
callback: ResolveCallback
) -> Option<bool>
Instantiates the module and its dependencies.
Returns an empty Maybe
#[must_use]
pub fn evaluate<'sc>(
&mut self,
scope: &mut impl ToLocal<'sc>,
context: Local<Context>
) -> Option<Local<'sc, Value>>
[src]
&mut self,
scope: &mut impl ToLocal<'sc>,
context: Local<Context>
) -> Option<Local<'sc, Value>>
Evaluates the module and its dependencies.
If status is kInstantiated, run the module's code. On success, set status to kEvaluated and return the completion value; on failure, set status to kErrored and propagate the thrown exception (which is then also available via |GetException|).
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Module
impl Send for Module
impl Sync for Module
impl Unpin for Module
impl UnwindSafe for Module
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,