pub struct PlatformChild { /* private fields */ }Expand description
Owned child handle returned by SpawnSpec::spawn.
Implementations§
Source§impl PlatformChild
impl PlatformChild
Sourcepub async fn wait(&mut self) -> Result<ExitStatus>
pub async fn wait(&mut self) -> Result<ExitStatus>
Wait for completion without capturing output.
Sourcepub async fn wait_with_output(self) -> Result<Output>
pub async fn wait_with_output(self) -> Result<Output>
Capture piped stdout and stderr while waiting for the child.
Sourcepub async fn write_stdin(&mut self, bytes: &[u8]) -> Result<()>
pub async fn write_stdin(&mut self, bytes: &[u8]) -> Result<()>
Write bytes to piped stdin and flush them.
Sourcepub fn close_stdin(&mut self)
pub fn close_stdin(&mut self)
Close the piped stdin handle, delivering EOF to the child.
This operation is idempotent. Closing an inherited or null stdin is also a no-op because there is no owned pipe to close.
Sourcepub async fn read_stdout_to_end(&mut self) -> Result<Vec<u8>>
pub async fn read_stdout_to_end(&mut self) -> Result<Vec<u8>>
Read all bytes from piped stdout without waiting for process exit.
Sourcepub async fn read_stderr_to_end(&mut self) -> Result<Vec<u8>>
pub async fn read_stderr_to_end(&mut self) -> Result<Vec<u8>>
Read all bytes from piped stderr without waiting for process exit.
Sourcepub fn into_actor_parts(
self,
) -> (PlatformLifecycle, PlatformEmergencySignal, Option<PlatformStdin>, Option<PlatformOutput>, Option<PlatformOutput>)
pub fn into_actor_parts( self, ) -> (PlatformLifecycle, PlatformEmergencySignal, Option<PlatformStdin>, Option<PlatformOutput>, Option<PlatformOutput>)
Split this child into sealed actor capabilities.
The lifecycle wait handle, emergency termination handle, input pipe, and output readers are deliberately separate so the actor can keep accepting control commands while an asynchronous exit wait is pending.