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

Trait Implementations

impl Clone for JSObject
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<'a> From<&'a JSObject> for JSObject
[src]

Performs the conversion.

impl Drop for JSObject
[src]

A method called when the value goes out of scope. Read more

impl<T> From<Vec<T>> for JSObject where
    JSObject: From<T>, 
[src]

Performs the conversion.

impl From<isize> for JSObject
[src]

Performs the conversion.

impl From<usize> for JSObject
[src]

Performs the conversion.

impl From<i32> for JSObject
[src]

Performs the conversion.

impl From<u32> for JSObject
[src]

Performs the conversion.

impl From<i16> for JSObject
[src]

Performs the conversion.

impl From<u16> for JSObject
[src]

Performs the conversion.

impl From<i8> for JSObject
[src]

Performs the conversion.

impl From<u8> for JSObject
[src]

Performs the conversion.

impl From<f32> for JSObject
[src]

Performs the conversion.

impl From<f64> for JSObject
[src]

Performs the conversion.

impl<'a> From<&'a str> for JSObject
[src]

Performs the conversion.

impl<'a> From<&'a String> for JSObject
[src]

Performs the conversion.

impl From<String> for JSObject
[src]

Performs the conversion.

impl From<bool> for JSObject
[src]

Performs the conversion.