pub struct ConsumerWeak<T> { /* private fields */ }Expand description
A weak handle from the consuming side (Consumer::weak).
Holds no ref count, so it never keeps the channel open. Unlike ProducerWeak it can
only mint more Consumers, so a read-only handle can never grow write access.
Implementations§
Source§impl<T> ConsumerWeak<T>
impl<T> ConsumerWeak<T>
Sourcepub fn poll_closed(&self, waiter: &Waiter) -> Poll<()>
pub fn poll_closed(&self, waiter: &Waiter) -> Poll<()>
Poll for channel closure, registering the waiter if still open.
Sourcepub fn same_channel(&self, other: &Self) -> bool
pub fn same_channel(&self, other: &Self) -> bool
Returns true if both handles share the same underlying state.
Trait Implementations§
Source§impl<T> Clone for ConsumerWeak<T>
impl<T> Clone for ConsumerWeak<T>
Auto Trait Implementations§
impl<T> Freeze for ConsumerWeak<T>
impl<T> RefUnwindSafe for ConsumerWeak<T>
impl<T> Send for ConsumerWeak<T>where
T: Send,
impl<T> Sync for ConsumerWeak<T>where
T: Send,
impl<T> Unpin for ConsumerWeak<T>
impl<T> UnsafeUnpin for ConsumerWeak<T>
impl<T> UnwindSafe for ConsumerWeak<T>
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