pub struct JsThreadLocal<T: 'static> { /* private fields */ }
Expand description
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" {
#[wasm_bindgen(thread_local_v2)]
static console: JsValue;
}
will generate in Rust a value that looks like:
ⓘ
static console: JsThreadLocal<JsValue> = ...;
Implementations§
Auto Trait Implementations§
impl<T> Freeze for JsThreadLocal<T>
impl<T> RefUnwindSafe for JsThreadLocal<T>
impl<T> Send for JsThreadLocal<T>
impl<T> Sync for JsThreadLocal<T>
impl<T> Unpin for JsThreadLocal<T>
impl<T> UnwindSafe for JsThreadLocal<T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more