pub struct ChannelBuffer<C: Channel> { /* private fields */ }Expand description
A channel abstraction to hide the complexity of partial payloads
Implementations§
Source§impl<C: Channel> ChannelBuffer<C>
impl<C: Channel> ChannelBuffer<C>
pub fn new(channel: C) -> Self
Sourcepub fn send_msg_chunks<M>(&mut self, msg: &M) -> Result<(), ChannelError>where
M: Fragment,
pub fn send_msg_chunks<M>(&mut self, msg: &M) -> Result<(), ChannelError>where
M: Fragment,
Enqueues a msg as a sequence payload chunks
Sourcepub fn recv_full_msg<M>(&mut self) -> Result<M, ChannelError>where
M: Fragment,
pub fn recv_full_msg<M>(&mut self) -> Result<M, ChannelError>where
M: Fragment,
Reads from the channel until a complete message is found
pub fn unwrap(self) -> C
Trait Implementations§
Auto Trait Implementations§
impl<C> Freeze for ChannelBuffer<C>where
C: Freeze,
impl<C> RefUnwindSafe for ChannelBuffer<C>where
C: RefUnwindSafe,
impl<C> Send for ChannelBuffer<C>where
C: Send,
impl<C> Sync for ChannelBuffer<C>where
C: Sync,
impl<C> Unpin for ChannelBuffer<C>where
C: Unpin,
impl<C> UnwindSafe for ChannelBuffer<C>where
C: UnwindSafe,
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