Struct quinn_proto::SendStream
source · [−]pub struct SendStream<'a> { /* private fields */ }
Expand description
Access to streams
Implementations
sourceimpl<'a> SendStream<'a>
impl<'a> SendStream<'a>
sourcepub fn write(&mut self, data: &[u8]) -> Result<usize, WriteError>
pub fn write(&mut self, data: &[u8]) -> Result<usize, WriteError>
Send data on the given stream
Returns the number of bytes successfully written.
sourcepub fn write_chunks(&mut self, data: &mut [Bytes]) -> Result<Written, WriteError>
pub fn write_chunks(&mut self, data: &mut [Bytes]) -> Result<Written, WriteError>
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.
sourcepub fn stopped(&mut self) -> Result<Option<VarInt>, UnknownStream>
pub fn stopped(&mut self) -> Result<Option<VarInt>, UnknownStream>
Check if this stream was stopped, get the reason if it was
sourcepub fn finish(&mut self) -> Result<(), FinishError>
pub fn finish(&mut self) -> Result<(), FinishError>
Finish a send stream, signalling that no more data will be sent.
If this fails, no StreamEvent::Finished
will be generated.
sourcepub fn set_priority(&mut self, priority: i32) -> Result<(), UnknownStream>
pub fn set_priority(&mut self, priority: i32) -> Result<(), UnknownStream>
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more