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:
#[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
.
The resulting type after dereferencing.
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static