pub struct ChannelReadHalf { /* private fields */ }Expand description
A handle to the reading part of a session channel.
Allows you to read from a channel without borrowing the session
Implementations§
Source§impl ChannelReadHalf
impl ChannelReadHalf
Sourcepub async fn wait(&mut self) -> Option<ChannelMsg>
pub async fn wait(&mut self) -> Option<ChannelMsg>
Awaits an incoming ChannelMsg, this method returns None if the channel has been closed.
Sourcepub fn make_reader(&mut self) -> impl AsyncRead + '_
pub fn make_reader(&mut self) -> impl AsyncRead + '_
Make a reader for the Channel to receive ChannelMsg::Data
through the AsyncRead trait.
Sourcepub fn make_reader_ext(&mut self, ext: Option<u32>) -> impl AsyncRead + '_
pub fn make_reader_ext(&mut self, ext: Option<u32>) -> impl AsyncRead + '_
Make a reader for the Channel to receive ChannelMsg::Data or ChannelMsg::ExtendedData
depending on the ext parameter, through the AsyncRead trait.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ChannelReadHalf
impl RefUnwindSafe for ChannelReadHalf
impl Send for ChannelReadHalf
impl Sync for ChannelReadHalf
impl Unpin for ChannelReadHalf
impl UnwindSafe for ChannelReadHalf
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