Struct rsjs::JSObject
[−]
[src]
pub struct JSObject { pub value: f64, // some fields omitted }
A reference to a JavaScript object.
A JSObject holds a handle to an entry to the RSJS
object table.
The Drop
implementation for JSObject
will cause the JavaScript
object to be removed from the RSJS
object table, allowing it to
be reclaimed by the JavaScript garbage collector.
If you wish to add a type T
that can be passed to JavaScript, you should
implement std::convert::From<T> for JSObject
.
Important note:
The value
field should never be read or modified directly,
it is only public so that it can be used by the js!
macro.
Fields
value: f64
Trait Implementations
impl Clone for JSObject
[src]
fn clone(&self) -> JSObject
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<'a> From<&'a JSObject> for JSObject
[src]
impl Drop for JSObject
[src]
impl<T> From<Vec<T>> for JSObject where
JSObject: From<T>,
[src]
JSObject: From<T>,