Skip to main content

PropertyKey

Trait PropertyKey 

Source
pub trait PropertyKey: Copy {
    // Required methods
    unsafe fn get_from<'c, C: Context<'c>>(
        self,
        cx: &mut C,
        out: &mut Value,
        obj: Value,
    ) -> bool;
    unsafe fn set_from<'c, C: Context<'c>>(
        self,
        cx: &mut C,
        out: &mut bool,
        obj: Value,
        val: Value,
    ) -> bool;
}
Expand description

A property key in a JavaScript object.

Required Methods§

Source

unsafe fn get_from<'c, C: Context<'c>>( self, cx: &mut C, out: &mut Value, obj: Value, ) -> bool

Source

unsafe fn set_from<'c, C: Context<'c>>( self, cx: &mut C, out: &mut bool, obj: Value, val: Value, ) -> bool

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl PropertyKey for &str

Source§

unsafe fn get_from<'c, C: Context<'c>>( self, cx: &mut C, out: &mut Value, obj: Value, ) -> bool

Source§

unsafe fn set_from<'c, C: Context<'c>>( self, cx: &mut C, out: &mut bool, obj: Value, val: Value, ) -> bool

Source§

impl PropertyKey for u32

Source§

unsafe fn get_from<'c, C: Context<'c>>( self, cx: &mut C, out: &mut Value, obj: Value, ) -> bool

Source§

unsafe fn set_from<'c, C: Context<'c>>( self, cx: &mut C, out: &mut bool, obj: Value, val: Value, ) -> bool

Implementors§

Source§

impl<'a, K: Value> PropertyKey for Handle<'a, K>