[−][src]Struct rquickjs::Object
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]
K: ToAtom<'js>,
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,