Struct wasm_bindgen::JsStatic[][src]

pub struct JsStatic<T: 'static> { /* fields omitted */ }

Wrapper type for imported statics.

This type is used whenever a static is imported from a JS module, for example this import:

This example is not tested
#[wasm_bindgen]
extern {
    static console: JsValue;
}

will generate in Rust a value that looks like:

This example is not tested
static console: JsStatic<JsValue> = ...;

This type implements Deref to the inner type so it's typically used as if it were &T.

Trait Implementations

impl<T: Sync> Sync for JsStatic<T>
[src]

impl<T: Send> Send for JsStatic<T>
[src]

impl<T: FromWasmAbi + 'static> Deref for JsStatic<T>
[src]

The resulting type after dereferencing.

Dereferences the value.