pub struct AtomicWebSocketState(/* private fields */);Expand description
Lock-free atomic wrapper for WebSocketState. Enables O(1) reads without acquiring any async lock.
Implementations§
Source§impl AtomicWebSocketState
impl AtomicWebSocketState
pub fn new(state: WebSocketState) -> Self
pub fn load(&self) -> WebSocketState
pub fn store(&self, state: WebSocketState)
Auto Trait Implementations§
impl !Freeze for AtomicWebSocketState
impl RefUnwindSafe for AtomicWebSocketState
impl Send for AtomicWebSocketState
impl Sync for AtomicWebSocketState
impl Unpin for AtomicWebSocketState
impl UnsafeUnpin for AtomicWebSocketState
impl UnwindSafe for AtomicWebSocketState
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