[][src]Struct quinn::SendStream

pub struct SendStream { /* fields omitted */ }

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.

Methods

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]

impl AsyncWrite for SendStream[src]

impl Debug for SendStream[src]

impl Drop for SendStream[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<W> AsyncWriteExt for W where
    W: AsyncWrite + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,