ObjectExt

Trait ObjectExt 

Source
pub trait ObjectExt<'js> {
    // Required method
    fn get_optional<K: IntoAtom<'js> + Clone, V: FromJs<'js>>(
        &self,
        k: K,
    ) -> Result<Option<V>>;
}

Required Methods§

Source

fn get_optional<K: IntoAtom<'js> + Clone, V: FromJs<'js>>( &self, k: K, ) -> Result<Option<V>>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<'js> ObjectExt<'js> for Object<'js>

Source§

fn get_optional<K: IntoAtom<'js> + Clone, V: FromJs<'js> + Sized>( &self, k: K, ) -> Result<Option<V>>

Source§

impl<'js> ObjectExt<'js> for Value<'js>

Source§

fn get_optional<K: IntoAtom<'js> + Clone, V: FromJs<'js>>( &self, k: K, ) -> Result<Option<V>>

Implementors§