pub struct PlatformOutput { /* private fields */ }Expand description
Opaque stdout or stderr reader owned by a process actor.
Implementations§
Source§impl PlatformOutput
impl PlatformOutput
Sourcepub async fn read_to_end(self) -> Result<Vec<u8>>
pub async fn read_to_end(self) -> Result<Vec<u8>>
Drain this output endpoint to EOF without blocking a runtime worker.
Sourcepub async fn read_chunk(&mut self, buffer: &mut [u8]) -> Result<usize>
pub async fn read_chunk(&mut self, buffer: &mut [u8]) -> Result<usize>
Read the next asynchronous chunk from this output endpoint.
The caller owns the buffer and therefore controls the amount of data
retained at each read. EOF is reported as Ok(0).
Sourcepub async fn shutdown(self) -> Result<()>
pub async fn shutdown(self) -> Result<()>
Abandon output and await destruction of this reader’s pending I/O.
This is not direct-child reaping or lossless EOF. The owning actor must retain this future until completion: dropping it is not an acknowledgement that platform I/O storage has been released. Cancellation requests alone do not count as completion, and an unresponsive driver may keep it pending.
Auto Trait Implementations§
impl Freeze for PlatformOutput
impl RefUnwindSafe for PlatformOutput
impl Send for PlatformOutput
impl Sync for PlatformOutput
impl Unpin for PlatformOutput
impl UnsafeUnpin for PlatformOutput
impl UnwindSafe for PlatformOutput
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
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