Struct quinn_proto::SendStream[][src]

pub struct SendStream<'a> { /* fields omitted */ }

Access to streams

Implementations

impl<'a> SendStream<'a>[src]

pub fn write(&mut self, data: &[u8]) -> Result<usize, WriteError>[src]

Send data on the given stream

Returns the number of bytes successfully written.

pub fn write_chunks(
    &mut self,
    data: &mut [Bytes]
) -> Result<Written, WriteError>
[src]

Send data on the given stream

Returns the number of bytes and chunks successfully written. Note that this method might also write a partial chunk. In this case Written::chunks will not count this chunk as fully written. However the chunk will be advanced and contain only non-written data after the call.

pub fn stopped(&mut self) -> Result<Option<VarInt>, UnknownStream>[src]

Check if this stream was stopped, get the reason if it was

pub fn finish(&mut self) -> Result<(), FinishError>[src]

Finish a send stream, signalling that no more data will be sent.

If this fails, no StreamEvent::Finished will be generated.

pub fn reset(&mut self, error_code: VarInt) -> Result<(), UnknownStream>[src]

Abandon transmitting data on a stream

Panics

  • when applied to a receive stream

pub fn set_priority(&mut self, priority: i32) -> Result<(), UnknownStream>[src]

Set the priority of a stream

Panics

  • when applied to a receive stream

pub fn priority(&self) -> Result<i32, UnknownStream>[src]

Get the priority of a stream

Panics

  • when applied to a receive stream

Auto Trait Implementations

impl<'a> !RefUnwindSafe for SendStream<'a>

impl<'a> Send for SendStream<'a>

impl<'a> !Sync for SendStream<'a>

impl<'a> Unpin for SendStream<'a>

impl<'a> !UnwindSafe for SendStream<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?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> 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>,