[][src]Struct rquickjs::Object

pub struct Object<'js>(_);

Rust representation of a javascript object.

Methods

impl<'js> Object<'js>[src]

pub fn new(ctx: Ctx<'js>) -> Result<Self>[src]

Create a new javascript object

pub fn get<K: ToAtom<'js>, V: FromJs<'js>>(&self, k: K) -> Result<V>[src]

Get a new value

pub fn contains_key<K>(&self, k: K) -> Result<bool> where
    K: ToAtom<'js>, 
[src]

check wether the object contains a certain key.

pub fn set<K: ToAtom<'js>, V: ToJs<'js>>(&self, key: K, value: V) -> Result<()>[src]

Set a member of an object to a certain value

pub fn remove<K: ToAtom<'js>>(&self, key: K) -> Result<()>[src]

Remove a member of this objects

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

Check if the object is a function.

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

Check if the object is an array.

Trait Implementations

impl<'js> Clone for Object<'js>[src]

impl<'js> Debug for Object<'js>[src]

impl<'js> FromJs<'js> for Object<'js>[src]

impl<'js> PartialEq<Object<'js>> for Object<'js>[src]

impl<'js> StructuralPartialEq for Object<'js>[src]

impl<'js> ToAtom<'js> for Object<'js>[src]

impl<'js> ToJs<'js> for Object<'js>[src]

Auto Trait Implementations

impl<'js> !RefUnwindSafe for Object<'js>

impl<'js> !Send for Object<'js>

impl<'js> !Sync for Object<'js>

impl<'js> Unpin for Object<'js>

impl<'js> UnwindSafe for Object<'js>

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.