Struct v8::ModuleRequest
source · [−]#[repr(C)]pub struct ModuleRequest(_);
Implementations
sourceimpl ModuleRequest
impl ModuleRequest
sourcepub fn get_specifier(&self) -> Local<'_, String>
pub fn get_specifier(&self) -> Local<'_, String>
Returns the module specifier for this ModuleRequest.
sourcepub fn get_source_offset(&self) -> int
pub fn get_source_offset(&self) -> int
Returns the source code offset of this module request. Use Module::source_offset_to_location to convert this to line/column numbers.
sourcepub fn get_import_assertions(&self) -> Local<'_, FixedArray>
pub fn get_import_assertions(&self) -> Local<'_, FixedArray>
Contains the import assertions for this request in the form: [key1, value1, source_offset1, key2, value2, source_offset2, …]. The keys and values are of type v8::String, and the source offsets are of type Int32. Use Module::source_offset_to_location to convert the source offsets to Locations with line/column numbers.
All assertions present in the module request will be supplied in this list, regardless of whether they are supported by the host. Per https://tc39.es/proposal-import-assertions/#sec-hostgetsupportedimportassertions, hosts are expected to ignore assertions that they do not support (as opposed to, for example, triggering an error if an unsupported assertion is present).
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 ModuleRequest
impl Debug for ModuleRequest
sourceimpl Deref for ModuleRequest
impl Deref for ModuleRequest
sourceimpl Hash for ModuleRequest
impl Hash for ModuleRequest
sourceimpl<'s> PartialEq<Data> for ModuleRequest
impl<'s> PartialEq<Data> for ModuleRequest
sourceimpl<'s> PartialEq<ModuleRequest> for ModuleRequest
impl<'s> PartialEq<ModuleRequest> for ModuleRequest
impl Eq for ModuleRequest
Auto Trait Implementations
impl RefUnwindSafe for ModuleRequest
impl Send for ModuleRequest
impl Sync for ModuleRequest
impl Unpin for ModuleRequest
impl UnwindSafe for ModuleRequest
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