Struct quinn::SendStream [−][src]
A stream that can only be used to send data
If dropped, streams that haven’t been explicitly reset
will continue to (re)transmit
previously written data until it has been fully acknowledged or the connection is closed.
Implementations
impl SendStream
[src]
pub fn write<'a>(&'a mut self, buf: &'a [u8]) -> Write<'a>
[src]
Write bytes to the stream
Yields the number of bytes written on success. Congestion and flow control may cause this to
be shorter than buf.len()
, indicating that only a prefix of buf
was written.
pub fn write_all<'a>(&'a mut self, buf: &'a [u8]) -> WriteAll<'a>
[src]
Convenience method to write an entire buffer to the stream
pub fn finish(&mut self) -> Finish<'_>
[src]
Shut down the send stream gracefully.
No new data may be written after calling this method. Completes when the peer has acknowledged all sent data, retransmitting data as needed.
pub fn reset(&mut self, error_code: VarInt)
[src]
Close the send stream immediately.
No new data can be written after calling this method. Locally buffered data is dropped,
and previously transmitted data will no longer be retransmitted if lost. If poll_finish
was called previously and all data has already been transmitted at least once, the peer
may still receive all written data.
Trait Implementations
impl AsyncWrite for SendStream
[src]
fn poll_write(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &[u8]
) -> Poll<Result<usize>>
[src]
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &[u8]
) -> Poll<Result<usize>>
fn poll_flush(self: Pin<&mut Self>, _cx: &mut Context<'_>) -> Poll<Result<()>>
[src]
fn poll_close(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<()>>
[src]
pub fn poll_write_vectored(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
bufs: &[IoSlice<'_>]
) -> Poll<Result<usize, Error>>
self: Pin<&mut Self>,
cx: &mut Context<'_>,
bufs: &[IoSlice<'_>]
) -> Poll<Result<usize, Error>>
impl AsyncWrite for SendStream
[src]
fn poll_write(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &[u8]
) -> Poll<Result<usize>>
[src]
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &[u8]
) -> Poll<Result<usize>>
fn poll_flush(self: Pin<&mut Self>, _cx: &mut Context<'_>) -> Poll<Result<()>>
[src]
fn poll_shutdown(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<()>>
[src]
pub fn poll_write_buf<B>(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &mut B
) -> Poll<Result<usize, Error>> where
B: Buf,
[src]
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &mut B
) -> Poll<Result<usize, Error>> where
B: Buf,
impl Debug for SendStream
[src]
impl Drop for SendStream
[src]
Auto Trait Implementations
impl !RefUnwindSafe for SendStream
impl Send for SendStream
impl Sync for SendStream
impl Unpin for SendStream
impl !UnwindSafe for SendStream
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<W> AsyncWriteExt for W where
W: AsyncWrite + ?Sized,
W: AsyncWrite + ?Sized,
pub fn flush(&mut self) -> Flush<'_, Self> where
Self: Unpin,
Self: Unpin,
pub fn close(&mut self) -> Close<'_, Self> where
Self: Unpin,
Self: Unpin,
pub fn write(&'a mut self, buf: &'a [u8]) -> Write<'a, Self> where
Self: Unpin,
Self: Unpin,
pub fn write_vectored(
&'a mut self,
bufs: &'a [IoSlice<'a>]
) -> WriteVectored<'a, Self> where
Self: Unpin,
&'a mut self,
bufs: &'a [IoSlice<'a>]
) -> WriteVectored<'a, Self> where
Self: Unpin,
pub fn write_all(&'a mut self, buf: &'a [u8]) -> WriteAll<'a, Self> where
Self: Unpin,
Self: Unpin,
pub fn into_sink<Item>(self) -> IntoSink<Self, Item> where
Item: AsRef<[u8]>,
Item: AsRef<[u8]>,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,