neon::object

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", so this trait is not object safe.

Implementations on Foreign Types§

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

Source§

impl<'a> PropertyKey for &'a 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

Implementors§

Source§

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