#[repr(C)]pub struct ScriptOrModule(/* private fields */);
Expand description
A container type that holds relevant metadata for module loading.
This is passed back to the embedder as part of HostImportModuleDynamicallyCallback for module loading.
Implementations§
Source§impl ScriptOrModule
impl ScriptOrModule
Sourcepub fn get_resource_name(&self) -> Local<'_, Value>
pub fn get_resource_name(&self) -> Local<'_, Value>
The name that was passed by the embedder as ResourceName to the ScriptOrigin. This can be either a v8::String or v8::Undefined.
Sourcepub fn get_host_defined_options(&self) -> Local<'_, PrimitiveArray>
pub fn get_host_defined_options(&self) -> Local<'_, PrimitiveArray>
The options that were passed by the embedder as HostDefinedOptions to the ScriptOrigin.
Methods from Deref<Target = Data>§
Sourcepub fn get_hash(&self) -> int
pub fn get_hash(&self) -> int
Returns the V8 hash value for this value. The current implementation uses a hidden property to store the identity hash on some object types.
The return value will never be 0. Also, it is not guaranteed to be unique.
Sourcepub fn is_private(&self) -> bool
pub fn is_private(&self) -> bool
Returns true if this data is a Private
.
Sourcepub fn is_object_template(&self) -> bool
pub fn is_object_template(&self) -> bool
Returns true if this data is an ObjectTemplate
Sourcepub fn is_function_template(&self) -> bool
pub fn is_function_template(&self) -> bool
Returns true if this data is a FunctionTemplate.
Trait Implementations§
Source§impl Debug for ScriptOrModule
impl Debug for ScriptOrModule
Source§impl Hash for ScriptOrModule
impl Hash for ScriptOrModule
Source§impl<'s> PartialEq<Data> for ScriptOrModule
impl<'s> PartialEq<Data> for ScriptOrModule
Source§impl<'s> PartialEq<ScriptOrModule> for Data
impl<'s> PartialEq<ScriptOrModule> for Data
Source§impl<'s> PartialEq for ScriptOrModule
impl<'s> PartialEq for ScriptOrModule
Source§impl Deref for ScriptOrModule
impl Deref for ScriptOrModule
impl Eq for ScriptOrModule
Auto Trait Implementations§
impl Freeze for ScriptOrModule
impl RefUnwindSafe for ScriptOrModule
impl Send for ScriptOrModule
impl Sync for ScriptOrModule
impl Unpin for ScriptOrModule
impl UnwindSafe for ScriptOrModule
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