pub struct ModuleRequest(/* private fields */);Implementations§
Source§impl ModuleRequest
impl ModuleRequest
Sourcepub fn get_specifier<'o>(&self) -> Local<'o, String>
pub fn get_specifier<'o>(&self) -> Local<'o, String>
Returns the module specifier for this ModuleRequest.
Sourcepub fn get_phase(&self) -> ModuleImportPhase
pub fn get_phase(&self) -> ModuleImportPhase
Returns the module import phase 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_attributes<'o>(&self) -> Local<'o, FixedArray>
pub fn get_import_attributes<'o>(&self) -> Local<'o, FixedArray>
Contains the import attributes 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.