Struct async_unsync::bounded::ReceiverRef
source · 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