pub struct Taker {
pub(crate) inner: Arc<Inner>,
}Expand description
An entity that wants a value.
Fields§
§inner: Arc<Inner>Implementations§
Source§impl Taker
impl Taker
Sourcepub fn cancel(&mut self)
pub fn cancel(&mut self)
Signal to the Giver that the want is canceled.
This is useful to tell that the channel is closed if you cannot drop the value yet.
Sourcepub fn unwant(&mut self)
pub fn unwant(&mut self)
Mark the state as idle, if the Taker is currently wanting.
This withdraws a want() that is no longer true, such as one signaled
just before a value arrived.
pub(crate) fn signal(&mut self, state: State)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Taker
impl !RefUnwindSafe for Taker
impl Send for Taker
impl Sync for Taker
impl Unpin for Taker
impl UnsafeUnpin for Taker
impl !UnwindSafe for Taker
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