Struct ObjectData

Source
pub struct ObjectData { /* private fields */ }
Expand description

Defines the kind of an object and its internal methods

Implementations§

Source§

impl ObjectData

Source

pub fn array() -> Self

Create the Array object data and reference its exclusive internal methods

Source

pub fn array_iterator(array_iterator: ArrayIterator) -> Self

Create the ArrayIterator object data

Source

pub fn map(map: OrderedMap<JsValue>) -> Self

Create the Map object data

Source

pub fn map_iterator(map_iterator: MapIterator) -> Self

Create the MapIterator object data

Source

pub fn reg_exp(reg_exp: Box<RegExp>) -> Self

Create the RegExp object data

Source

pub fn reg_exp_string_iterator( reg_exp_string_iterator: RegExpStringIterator, ) -> Self

Create the RegExpStringIterator object data

Source

pub fn big_int(big_int: JsBigInt) -> Self

Create the BigInt object data

Source

pub fn boolean(boolean: bool) -> Self

Create the Boolean object data

Source

pub fn for_in_iterator(for_in_iterator: ForInIterator) -> Self

Create the ForInIterator object data

Source

pub fn function(function: Function) -> Self

Create the Function object data

Source

pub fn set(set: OrderedSet<JsValue>) -> Self

Create the Set object data

Source

pub fn set_iterator(set_iterator: SetIterator) -> Self

Create the SetIterator object data

Source

pub fn string(string: JsString) -> Self

Create the String object data and reference its exclusive internal methods

Source

pub fn string_iterator(string_iterator: StringIterator) -> Self

Create the StringIterator object data

Source

pub fn number(number: f64) -> Self

Create the Number object data

Source

pub fn symbol(symbol: JsSymbol) -> Self

Create the Symbol object data

Source

pub fn error() -> Self

Create the Error object data

Source

pub fn ordinary() -> Self

Create the Ordinary object data

Source

pub fn date(date: Date) -> Self

Create the Date object data

Source

pub fn global() -> Self

Create the Global object data

Source

pub fn native_object(native_object: Box<dyn NativeObject>) -> Self

Create the NativeObject object data

Trait Implementations§

Source§

impl Debug for ObjectData

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for ObjectData

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl Finalize for ObjectData

Source§

impl Trace for ObjectData

Source§

unsafe fn trace(&self)

Marks all contained Gcs.
Source§

unsafe fn root(&self)

Increments the root-count of all contained Gcs.
Source§

unsafe fn unroot(&self)

Decrements the root-count of all contained Gcs.
Source§

fn finalize_glue(&self)

Runs Finalize::finalize() on this object and all contained subobjects

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> NativeObject for T
where T: Any + Debug + Trace,

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert the Rust type which implements NativeObject to a &dyn Any.
Source§

fn as_mut_any(&mut self) -> &mut (dyn Any + 'static)

Convert the Rust type which implements NativeObject to a &mut dyn Any.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V