pub struct PipeStdout { /* private fields */ }
Available on crate feature
stdio
and Unix only.Expand description
Locked stdout for asynchronous read.
Implementations§
Source§impl PipeStdout
impl PipeStdout
Sourcepub fn lock_tokio() -> Result<TokioPipeStdout>
Available on crate feature tokio
only.
pub fn lock_tokio() -> Result<TokioPipeStdout>
tokio
only.Shortcut to PipeStdout::lock
and then PipeStdout::try_into_tokio
.
§Errors
Fails if cannot create AsyncFd
.
Sourcepub fn try_into_tokio(self) -> Result<TokioPipeStdout>
Available on crate feature tokio
only.
pub fn try_into_tokio(self) -> Result<TokioPipeStdout>
tokio
only.Source§impl PipeStdout
impl PipeStdout
Sourcepub fn lock() -> Result<Self>
pub fn lock() -> Result<Self>
Lock stdout with pipe-like backend and set it to asynchronous mode.
§Errors
Fails if the underlying FD is not pipe-like, or error occurs when setting mode. See module level documentation for more details.
Trait Implementations§
Source§impl AsFd for PipeStdout
impl AsFd for PipeStdout
Source§fn as_fd(&self) -> BorrowedFd<'_>
fn as_fd(&self) -> BorrowedFd<'_>
Borrows the file descriptor. Read more
Source§impl AsRawFd for PipeStdout
impl AsRawFd for PipeStdout
Source§impl Debug for PipeStdout
impl Debug for PipeStdout
Source§impl Write for &PipeStdout
impl Write for &PipeStdout
Source§fn write(&mut self, buf: &[u8]) -> Result<usize>
fn write(&mut self, buf: &[u8]) -> Result<usize>
Writes a buffer into this writer, returning how many bytes were written. Read more
Source§fn flush(&mut self) -> Result<()>
fn flush(&mut self) -> Result<()>
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
Source§impl Write for PipeStdout
impl Write for PipeStdout
Source§fn write(&mut self, buf: &[u8]) -> Result<usize>
fn write(&mut self, buf: &[u8]) -> Result<usize>
Writes a buffer into this writer, returning how many bytes were written. Read more
Source§fn flush(&mut self) -> Result<()>
fn flush(&mut self) -> Result<()>
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
impl IoSafe for PipeStdout
Auto Trait Implementations§
impl Freeze for PipeStdout
impl RefUnwindSafe for PipeStdout
impl !Send for PipeStdout
impl !Sync for PipeStdout
impl Unpin for PipeStdout
impl UnwindSafe for PipeStdout
Blanket Implementations§
Source§impl<T> AsSource for Twhere
T: AsFd,
impl<T> AsSource for Twhere
T: AsFd,
Source§fn source(&self) -> BorrowedFd<'_>
fn source(&self) -> BorrowedFd<'_>
Returns the borrowed file descriptor.
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