pub struct Leased<T> { /* private fields */ }Expand description
A signal-like value whose producer can wait until all outstanding readers finish.
Leased counts live claims; drain blocks until the count
reaches zero, which is used to hold a producer’s stop until consumers are done.
Implementations§
Trait Implementations§
Source§impl<T: Observable> Observable for Leased<T>
Available on crate feature coupling-observe only.Polling a wrapped signal is polling what it wraps, so an observed entry
keeps working when a signal gains a lease count.
impl<T: Observable> Observable for Leased<T>
Available on crate feature
coupling-observe only.Polling a wrapped signal is polling what it wraps, so an observed entry
keeps working when a signal gains a lease count.
Source§fn change_token(&self) -> u32
fn change_token(&self) -> u32
Return a token that changes when the signal is written.
Auto Trait Implementations§
impl<T> !Freeze for Leased<T>
impl<T> !RefUnwindSafe for Leased<T>
impl<T> Send for Leased<T>where
T: Send,
impl<T> Sync for Leased<T>where
T: Sync,
impl<T> Unpin for Leased<T>where
T: Unpin,
impl<T> UnsafeUnpin for Leased<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Leased<T>where
T: 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