pub struct StreamHandle { /* private fields */ }Expand description
Handle to a specific stream
Implementations§
Source§impl StreamHandle
impl StreamHandle
Sourcepub async fn send_data(&mut self, payload: Bytes) -> Result<(), ProtocolError>
pub async fn send_data(&mut self, payload: Bytes) -> Result<(), ProtocolError>
Send a data frame on this stream
Sourcepub async fn send_end_stream(&mut self) -> Result<(), ProtocolError>
pub async fn send_end_stream(&mut self) -> Result<(), ProtocolError>
Send an end-of-stream frame
Sourcepub async fn recv_frame(&mut self) -> Option<Frame>
pub async fn recv_frame(&mut self) -> Option<Frame>
Receive the next frame on this stream
Sourcepub async fn close(&mut self) -> Result<(), ProtocolError>
pub async fn close(&mut self) -> Result<(), ProtocolError>
Close this stream
Sourcepub fn state(&self) -> StreamState
pub fn state(&self) -> StreamState
Get the current stream state
Auto Trait Implementations§
impl !Freeze for StreamHandle
impl !RefUnwindSafe for StreamHandle
impl Send for StreamHandle
impl Sync for StreamHandle
impl Unpin for StreamHandle
impl !UnwindSafe for StreamHandle
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