pub struct HookContextCell(/* private fields */);Expand description
A Sync wrapper for single-threaded global HookContextInner access.
SAFETY: This type is only safe to use in single-threaded contexts
(e.g., WASM). It implements Sync to allow usage as a static
variable, but concurrent access from multiple threads would be
undefined behavior.
Trait Implementations§
impl Sync for HookContextCell
SAFETY: HookContextCell is only used in single-threaded WASM contexts.
Concurrent access from multiple threads would be undefined behavior.
Auto Trait Implementations§
impl !Freeze for HookContextCell
impl !RefUnwindSafe for HookContextCell
impl !Send for HookContextCell
impl Unpin for HookContextCell
impl UnsafeUnpin for HookContextCell
impl !UnwindSafe for HookContextCell
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