pub struct SendStream { /* private fields */ }Expand description
An outgoing stream. Dropping it unfinished resets it with code 0.
Trait Implementations§
Source§impl Debug for SendStream
impl Debug for SendStream
Source§impl Drop for SendStream
impl Drop for SendStream
Source§impl SendStream for SendStream
impl SendStream for SendStream
Source§fn poll_write(
&mut self,
cx: &mut Context<'_>,
buf: &[u8],
) -> Poll<Result<usize, Self::Error>>
fn poll_write( &mut self, cx: &mut Context<'_>, buf: &[u8], ) -> Poll<Result<usize, Self::Error>>
Poll to write some of the buffer to the stream, returning how many bytes were
written. See
poll_write_buf for the partial-write
contract, which this shares.Source§fn set_priority(&mut self, order: u8)
fn set_priority(&mut self, order: u8)
Set the stream’s priority. Read more
Source§fn finish(&mut self) -> Result<(), Self::Error>
fn finish(&mut self) -> Result<(), Self::Error>
Mark the stream as finished, erroring on any future writes. Read more
Source§fn reset(&mut self, code: u32)
fn reset(&mut self, code: u32)
Immediately closes the stream and discards any remaining data. Read more
Auto Trait Implementations§
impl !Freeze for SendStream
impl !RefUnwindSafe for SendStream
impl !Send for SendStream
impl !Sync for SendStream
impl !UnwindSafe for SendStream
impl Unpin for SendStream
impl UnsafeUnpin for SendStream
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<S> SendStream for Swhere
S: SendStream + 'static,
impl<S> SendStream for Swhere
S: SendStream + 'static,
Source§fn write<'a>(&'a mut self, buf: &'a [u8]) -> Write<'a, Self> ⓘ
fn write<'a>(&'a mut self, buf: &'a [u8]) -> Write<'a, Self> ⓘ
Write some of the buffer, returning how many bytes were accepted.
Source§fn write_buf<'a, B>(&'a mut self, buf: &'a mut B) -> WriteBuf<'a, Self, B> ⓘwhere
B: Buf,
fn write_buf<'a, B>(&'a mut self, buf: &'a mut B) -> WriteBuf<'a, Self, B> ⓘwhere
B: Buf,
Write some of the buffer, advancing it by the bytes accepted.
Source§fn write_chunk(&mut self, chunk: Bytes) -> WriteChunk<'_, Self> ⓘ
fn write_chunk(&mut self, chunk: Bytes) -> WriteChunk<'_, Self> ⓘ
Write the entire chunk to the stream.
Source§fn closed(&mut self) -> SendClosed<'_, Self> ⓘ
fn closed(&mut self) -> SendClosed<'_, Self> ⓘ
Wait until the stream is closed by either side.