pub struct ChannelBuffer<const N: usize> { /* private fields */ }Expand description
The main async channel buffer.
Implementations§
Source§impl<const N: usize> ChannelBuffer<N>
impl<const N: usize> ChannelBuffer<N>
Sourcepub fn new(receiver: Receiver<Bytes<N>>) -> Self
pub fn new(receiver: Receiver<Bytes<N>>) -> Self
Creates a new ChannelBuffer by wrapping a mpsc channel.
§Arguments
receiver: the channel to wrap.
returns: ChannelBuffer<{ N }>
Sourcepub fn close(self)
pub fn close(self)
Closes this ChannelBuffer.
Trait Implementations§
Auto Trait Implementations§
impl<const N: usize> Freeze for ChannelBuffer<N>
impl<const N: usize> RefUnwindSafe for ChannelBuffer<N>
impl<const N: usize> Send for ChannelBuffer<N>
impl<const N: usize> Sync for ChannelBuffer<N>
impl<const N: usize> Unpin for ChannelBuffer<N>
impl<const N: usize> UnwindSafe for ChannelBuffer<N>
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