pub struct ReceiverRef<'a, T> { /* private fields */ }
Expand description
A borrowing handle for receiving elements through a split bounded Channel
.
Implementations§
Source§impl<T> ReceiverRef<'_, T>
impl<T> ReceiverRef<'_, T>
Sourcepub fn max_capacity(&self) -> usize
pub fn max_capacity(&self) -> usize
Returns the maximum buffer capacity of the channel.
This is the capacity initially specified when creating the channel and remains constant.
Sourcepub fn capacity(&self) -> usize
pub fn capacity(&self) -> usize
Returns the current capacity of the channel.
The capacity goes down when sending a value and goes up when receiving a value. When the capacity is zero, any subsequent sends will only resolve once sufficient capacity is available
Sourcepub fn try_recv(&mut self) -> Result<T, TryRecvError>
pub fn try_recv(&mut self) -> Result<T, TryRecvError>
Trait Implementations§
Source§impl<T> Debug for ReceiverRef<'_, T>
impl<T> Debug for ReceiverRef<'_, T>
Auto Trait Implementations§
impl<'a, T> Freeze for ReceiverRef<'a, T>
impl<'a, T> !RefUnwindSafe for ReceiverRef<'a, T>
impl<'a, T> !Send for ReceiverRef<'a, T>
impl<'a, T> !Sync for ReceiverRef<'a, T>
impl<'a, T> Unpin for ReceiverRef<'a, T>
impl<'a, T> !UnwindSafe for ReceiverRef<'a, 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