pub struct DtactChildStdout(/* private fields */);Expand description
One end of a child process’s stdout pipe.
Exclusively owned by whoever holds it (returned by take_stdout on
DtactChild) — each async op temporarily moves the handle into a pool
closure and gets it back in the result, never shared behind a lock.
Implementations§
Source§impl DtactChildStdout
impl DtactChildStdout
Sourcepub async fn read(&mut self, buf: Vec<u8>) -> Result<(usize, Vec<u8>)>
pub async fn read(&mut self, buf: Vec<u8>) -> Result<(usize, Vec<u8>)>
Read from the child’s stdout on the process pool into buf,
returning the number of bytes read and the buffer back.
§Errors
Returns whatever the underlying blocking Read::read on the pipe
returns.
§Panics
Panics if called again while a previous call on the same &mut self hasn’t finished — see DtactChildStdin::write’s doc for
why this is unreachable through safe code.
Auto Trait Implementations§
impl Freeze for DtactChildStdout
impl RefUnwindSafe for DtactChildStdout
impl Send for DtactChildStdout
impl Sync for DtactChildStdout
impl Unpin for DtactChildStdout
impl UnsafeUnpin for DtactChildStdout
impl UnwindSafe for DtactChildStdout
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