Struct JsStatic
Deprecated: use with `#[wasm_bindgen(thread_local_v2)]` instead
pub struct JsStatic<T: 'static> { /* private fields */ }
Wrapper type for imported statics.
This type is used whenever a static is imported from a JS module, for
example this import:
#[wasm_bindgen]
extern "C" {
static console: JsValue;
}
will generate in Rust a value that looks like:
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: FromWasmAbi + 'static> Deref for JsStatic<T>
type Target = T;fn deref(&self) -> &T