pub struct SyncStreamWriteHalf<S> { /* private fields */ }Available on crate features
io and compat only.Expand description
Write half of a SyncStream after splitting.
Implementations§
Source§impl<S> SyncStreamWriteHalf<S>
impl<S> SyncStreamWriteHalf<S>
Sourcepub fn into_inner(self) -> S
pub fn into_inner(self) -> S
Consumes the SyncStreamWriteHalf, returning the underlying stream.
Sourcepub fn has_pending_write(&self) -> bool
pub fn has_pending_write(&self) -> bool
Returns true if there is pending data in the write buffer that needs
to be flushed.
Source§impl<S> SyncStreamWriteHalf<S>where
S: AsyncWrite,
impl<S> SyncStreamWriteHalf<S>where
S: AsyncWrite,
Sourcepub async fn flush_write_buf(&mut self) -> Result<usize, Error>
pub async fn flush_write_buf(&mut self) -> Result<usize, Error>
Trait Implementations§
Source§impl<S> Debug for SyncStreamWriteHalf<S>where
S: Debug,
impl<S> Debug for SyncStreamWriteHalf<S>where
S: Debug,
Source§impl<S> Write for SyncStreamWriteHalf<S>
impl<S> Write for SyncStreamWriteHalf<S>
Source§fn write(&mut self, buf: &[u8]) -> Result<usize, Error>
fn write(&mut self, buf: &[u8]) -> Result<usize, Error>
Writes a buffer into this writer, returning how many bytes were written. Read more
Source§fn flush(&mut self) -> Result<(), Error>
fn flush(&mut self) -> Result<(), Error>
Flushes this output stream, ensuring that all intermediately buffered
contents reach their destination. Read more
Source§fn is_write_vectored(&self) -> bool
fn is_write_vectored(&self) -> bool
🔬This is a nightly-only experimental API. (
can_vector)1.0.0 · Source§fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
Attempts to write an entire buffer into this writer. Read more
Source§fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
🔬This is a nightly-only experimental API. (
write_all_vectored)Attempts to write multiple buffers into this writer. Read more
Auto Trait Implementations§
impl<S> Freeze for SyncStreamWriteHalf<S>where
S: Freeze,
impl<S> RefUnwindSafe for SyncStreamWriteHalf<S>where
S: RefUnwindSafe,
impl<S> Send for SyncStreamWriteHalf<S>where
S: Send,
impl<S> Sync for SyncStreamWriteHalf<S>where
S: Sync,
impl<S> Unpin for SyncStreamWriteHalf<S>where
S: Unpin,
impl<S> UnsafeUnpin for SyncStreamWriteHalf<S>where
S: UnsafeUnpin,
impl<S> UnwindSafe for SyncStreamWriteHalf<S>where
S: UnwindSafe,
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more