Struct rusty_v8::ModuleRequest[][src]

#[repr(C)]pub struct ModuleRequest(_);

Implementations

impl ModuleRequest[src]

pub fn get_specifier(&self) -> Local<'_, String>[src]

Returns the module specifier for this ModuleRequest.

pub fn get_source_offset(&self) -> int[src]

Returns the source code offset of this module request. Use Module::source_offset_to_location to convert this to line/column numbers.

pub fn get_import_assertions(&self) -> Local<'_, FixedArray>[src]

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>

pub fn get_hash(&self) -> int[src]

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.

pub fn is_value(&self) -> bool[src]

Returns true if this data is a Value.

pub fn is_module(&self) -> bool[src]

Returns true if this data is a Module.

pub fn is_private(&self) -> bool[src]

Returns true if this data is a Private.

pub fn is_object_template(&self) -> bool[src]

Returns true if this data is an ObjectTemplate

pub fn is_function_template(&self) -> bool[src]

Returns true if this data is a FunctionTemplate.

Trait Implementations

impl Debug for ModuleRequest[src]

impl Deref for ModuleRequest[src]

type Target = Data

The resulting type after dereferencing.

impl Eq for ModuleRequest[src]

impl Hash for ModuleRequest[src]

impl<'s> PartialEq<Data> for ModuleRequest[src]

impl<'s> PartialEq<ModuleRequest> for ModuleRequest[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.