Struct v8::ScriptOrModule
source · [−]#[repr(C)]pub struct ScriptOrModule(_);
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
sourceimpl 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
sourceimpl Debug for ScriptOrModule
impl Debug for ScriptOrModule
sourceimpl Deref for ScriptOrModule
impl Deref for ScriptOrModule
sourceimpl Hash for ScriptOrModule
impl Hash for ScriptOrModule
sourceimpl<'s> PartialEq<Data> for ScriptOrModule
impl<'s> PartialEq<Data> for ScriptOrModule
sourceimpl<'s> PartialEq<ScriptOrModule> for Data
impl<'s> PartialEq<ScriptOrModule> for Data
sourceimpl<'s> PartialEq<ScriptOrModule> for ScriptOrModule
impl<'s> PartialEq<ScriptOrModule> for ScriptOrModule
impl Eq for ScriptOrModule
Auto Trait Implementations
impl RefUnwindSafe for ScriptOrModule
impl Send for ScriptOrModule
impl Sync for ScriptOrModule
impl Unpin for ScriptOrModule
impl UnwindSafe for ScriptOrModule
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