Struct quinn::generic::SendStream[][src]

pub struct SendStream<S> where
    S: Session
{ /* 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.

Implementations

impl<S> SendStream<S> where
    S: Session
[src]

pub fn write<'a>(&'a mut self, buf: &'a [u8]) -> Write<'a, S>[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, S>[src]

Convenience method to write an entire buffer to the stream

pub fn finish(&mut self) -> Finish<'_, S>[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<S> AsyncWrite for SendStream<S> where
    S: Session
[src]

impl<S> AsyncWrite for SendStream<S> where
    S: Session
[src]

impl<S: Debug> Debug for SendStream<S> where
    S: Session
[src]

impl<S> Drop for SendStream<S> where
    S: Session
[src]

Auto Trait Implementations

impl<S> !RefUnwindSafe for SendStream<S>

impl<S> Send for SendStream<S>

impl<S> Sync for SendStream<S>

impl<S> Unpin for SendStream<S>

impl<S> !UnwindSafe for SendStream<S>

Blanket Implementations

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

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

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> Instrument 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>,