Struct TypedArray

Source
pub struct TypedArray<T: TypedArrayElement> { /* private fields */ }

Implementations§

Source§

impl<T: TypedArrayElement> TypedArray<T>

Source

pub fn new(value: T, len: usize) -> TypedArray<T>

Source

pub fn resize(&self, len: usize)

Source

pub fn set(&self, id: usize, v: T)

Source

pub fn get(&self, id: usize) -> T

Source

pub fn len(&self) -> usize

Trait Implementations§

Source§

impl<T: TypedArrayElement> Object for TypedArray<T>

Source§

fn get_children(&self) -> Vec<usize>

Source§

fn as_any(&self) -> &dyn Any

Source§

fn as_any_mut(&mut self) -> &mut dyn Any

Source§

fn call_field(&self, name: &str, executor: &mut ExecutorImpl) -> Value

Source§

fn finalize(&self, _pool: &mut ObjectPool)

Source§

fn initialize(&mut self, _pool: &mut ObjectPool)

Source§

fn call(&self, _executor: &mut ExecutorImpl) -> Value

Source§

fn get_field(&self, _pool: &ObjectPool, _name: &str) -> Option<Value>

Source§

fn set_field(&self, _name: &str, _value_ref: Value)

Source§

fn must_get_field(&self, pool: &ObjectPool, name: &str) -> Value

Source§

fn has_const_field(&self, _pool: &ObjectPool, _name: &str) -> bool

Source§

fn compare(&self, _other: &ValueContext<'_, '_>) -> Option<Ordering>

Source§

fn test_eq(&self, _other: &ValueContext<'_, '_>) -> bool

Source§

fn typename(&self) -> &str

Source§

fn to_i64(&self) -> i64

Source§

fn to_f64(&self) -> f64

Source§

fn to_str(&self) -> &str

Source§

fn to_string(&self) -> String

Source§

fn to_bool(&self) -> bool

Auto Trait Implementations§

§

impl<T> !Freeze for TypedArray<T>

§

impl<T> !RefUnwindSafe for TypedArray<T>

§

impl<T> Send for TypedArray<T>

§

impl<T> !Sync for TypedArray<T>

§

impl<T> Unpin for TypedArray<T>
where T: Unpin,

§

impl<T> UnwindSafe for TypedArray<T>
where T: UnwindSafe,

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, 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.