pub struct SendStream { /* private fields */ }
Expand description
An outgoing stream of bytes to the peer.
QUIC streams have flow control, which means the send rate is limited by the peer’s receive window. The stream will be closed with a graceful FIN when dropped.
Implementations§
Source§impl SendStream
impl SendStream
Sourcepub async fn write(&mut self, buf: &[u8]) -> Result<(), Error>
pub async fn write(&mut self, buf: &[u8]) -> Result<(), Error>
Write all of the buffer to the stream.
Sourcepub async fn write_buf<B: Buf>(&mut self, buf: &mut B) -> Result<(), Error>
pub async fn write_buf<B: Buf>(&mut self, buf: &mut B) -> Result<(), Error>
Write the given buffer to the stream, advancing the internal position.
This may be polled to perform partial writes.
Sourcepub fn set_priority(&mut self, order: i32)
pub fn set_priority(&mut self, order: i32)
Set the stream’s priority.
Streams with lower values will be sent first, but are not guaranteed to arrive first.
Auto Trait Implementations§
impl Freeze for SendStream
impl RefUnwindSafe for SendStream
impl Send for SendStream
impl Sync for SendStream
impl Unpin for SendStream
impl UnwindSafe for SendStream
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more