pub struct DtactChildStderr(/* private fields */);Expand description
One end of a child process’s stderr pipe.
Exclusively owned by whoever holds it (returned by take_stderr 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 DtactChildStderr
impl DtactChildStderr
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 stderr 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 DtactChildStderr
impl RefUnwindSafe for DtactChildStderr
impl Send for DtactChildStderr
impl Sync for DtactChildStderr
impl Unpin for DtactChildStderr
impl UnsafeUnpin for DtactChildStderr
impl UnwindSafe for DtactChildStderr
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