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>where
T: RefUnwindSafe + UnwindSafe,
impl<T> Send for JsThreadLocal<T>
impl<T> Sync for JsThreadLocal<T>
impl<T> Unpin for JsThreadLocal<T>
impl<T> UnsafeUnpin for JsThreadLocal<T>
impl<T> UnwindSafe for JsThreadLocal<T>where
T: RefUnwindSafe + UnwindSafe,
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
Source§impl<S, T> Upcast<T> for S
impl<S, T> Upcast<T> for S
Source§fn upcast(&self) -> &T
fn upcast(&self) -> &T
Perform a zero-cost type-safe upcast to a wider ref type within the Wasm
bindgen generics type system. Read more
Source§fn upcast_into(self) -> Twhere
Self: Sized + ErasableGeneric,
T: Sized + ErasableGeneric<Repr = <Self as ErasableGeneric>::Repr>,
fn upcast_into(self) -> Twhere
Self: Sized + ErasableGeneric,
T: Sized + ErasableGeneric<Repr = <Self as ErasableGeneric>::Repr>,
Perform a zero-cost type-safe upcast to a wider type within the Wasm
bindgen generics type system. Read more