Struct v8::ModuleRequest
source · #[repr(C)]pub struct ModuleRequest(_);
Implementations§
source§impl 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 is_big_int(&self) -> bool
pub fn is_big_int(&self) -> bool
Returns true if this data is a BigInt
.
sourcepub fn is_boolean(&self) -> bool
pub fn is_boolean(&self) -> bool
Returns true if this data is a Boolean
.
sourcepub fn is_context(&self) -> bool
pub fn is_context(&self) -> bool
Returns true if this data is a Context
.
sourcepub fn is_fixed_array(&self) -> bool
pub fn is_fixed_array(&self) -> bool
Returns true if this data is a FixedArray
.
sourcepub fn is_function_template(&self) -> bool
pub fn is_function_template(&self) -> bool
Returns true if this data is a FunctionTemplate
.
sourcepub fn is_module_request(&self) -> bool
pub fn is_module_request(&self) -> bool
Returns true if this data is a ModuleRequest
.
sourcepub fn is_object_template(&self) -> bool
pub fn is_object_template(&self) -> bool
Returns true if this data is a ObjectTemplate
.
sourcepub fn is_primitive(&self) -> bool
pub fn is_primitive(&self) -> bool
Returns true if this data is a Primitive
.
sourcepub fn is_private(&self) -> bool
pub fn is_private(&self) -> bool
Returns true if this data is a Private
.
Trait Implementations§
source§impl Debug for ModuleRequest
impl Debug for ModuleRequest
source§impl Deref for ModuleRequest
impl Deref for ModuleRequest
source§impl<'s> PartialEq<Data> for ModuleRequest
impl<'s> PartialEq<Data> for ModuleRequest
source§impl<'s> PartialEq<ModuleRequest> for Data
impl<'s> PartialEq<ModuleRequest> for Data
source§fn eq(&self, other: &ModuleRequest) -> bool
fn eq(&self, other: &ModuleRequest) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl<'s> PartialEq<ModuleRequest> for ModuleRequest
impl<'s> PartialEq<ModuleRequest> for ModuleRequest
source§fn eq(&self, other: &ModuleRequest) -> bool
fn eq(&self, other: &ModuleRequest) -> bool
self
and other
values to be equal, and is used
by ==
.