struct Shared<T> {
value: RwLock<T>,
state: AtomicState,
ref_count_rx: AtomicUsize,
ref_count_tx: AtomicUsize,
notify_rx: BigNotify,
notify_tx: Notify,
}Fields§
§value: RwLock<T>The most recent value.
state: AtomicStateThe current version.
The lowest bit represents a “closed” state. The rest of the bits represent the current version.
ref_count_rx: AtomicUsizeTracks the number of Receiver instances.
ref_count_tx: AtomicUsizeTracks the number of Sender instances.
notify_rx: BigNotifyNotifies waiting receivers that the value changed.
notify_tx: NotifyNotifies any task listening for Receiver dropped events.
Trait Implementations§
Auto Trait Implementations§
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