pub struct RawStream<P>where
P: Protocol,{ /* private fields */ }Expand description
Opaque frame stream whose lifetime retains its connection and ID lease.
Implementations§
Source§impl<P> RawStream<P>where
P: Protocol,
impl<P> RawStream<P>where
P: Protocol,
Sourcepub async fn send(&self, flags: u8, body: &[u8]) -> Result<(), ClientError>
pub async fn send(&self, flags: u8, body: &[u8]) -> Result<(), ClientError>
Send a follow-up opaque frame; local close never sends a protocol signal.
Sourcepub async fn recv(&mut self) -> Result<Option<RawFrame>, ClientError>
pub async fn recv(&mut self) -> Result<Option<RawFrame>, ClientError>
Receive each frame, terminal included, then clean exhaustion or an error.
Sourcepub fn close(&mut self)
pub fn close(&mut self)
Abandon local consumption and retain bounded drain state until terminal.
Sourcepub fn into_parts(self) -> (RawStreamSender<P>, RawStreamReceiver<P>)
pub fn into_parts(self) -> (RawStreamSender<P>, RawStreamReceiver<P>)
Move ownership into a cloneable sender and one consuming receiver.
Auto Trait Implementations§
impl<P> !RefUnwindSafe for RawStream<P>
impl<P> !UnwindSafe for RawStream<P>
impl<P> Freeze for RawStream<P>
impl<P> Send for RawStream<P>
impl<P> Sync for RawStream<P>
impl<P> Unpin for RawStream<P>
impl<P> UnsafeUnpin for RawStream<P>
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