pub struct SendStream { /* private fields */ }Expand description
A byte stream sent to the remote peer.
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 provided bytes to the stream.
Sourcepub async fn write_buf<B: Buf>(&mut self, buf: &mut B) -> Result<usize, Error>
pub async fn write_buf<B: Buf>(&mut self, buf: &mut B) -> Result<usize, Error>
Write some of the provided buffer to the stream.
Sourcepub fn reset(&mut self, reason: &str)
pub fn reset(&mut self, reason: &str)
Send an immediate reset, closing the stream with an error.
Sourcepub fn finish(&mut self) -> Result<(), Error>
pub fn finish(&mut self) -> Result<(), Error>
Mark the stream as finished.
This is called on drop, but can also be invoked manually.
Sourcepub fn set_priority(&mut self, priority: i32)
pub fn set_priority(&mut self, priority: i32)
Set the stream’s priority.
Streams with higher values are sent first, but delivery order is not guaranteed.
Trait Implementations§
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