Skip to main content

MuseChild

Struct MuseChild 

Source
pub struct MuseChild { /* private fields */ }
Expand description

The SDK-owned host process and its stdio handles.

Implementations§

Source§

impl MuseChild

Source

pub fn binary(&self) -> &Path

The explicit or discovered binary used for this child.

Source

pub fn id(&self) -> Option<u32>

OS process identifier, while the platform exposes one.

Source

pub fn take_stdin(&mut self) -> Option<ChildStdin>

Take the host’s stdin for the connection transport.

Source

pub fn take_stdout(&mut self) -> Option<ChildStdout>

Take the host’s stdout for the connection transport.

Source

pub fn start_kill(&mut self) -> Result<()>

Ask the OS to end the owned child without awaiting it.

Source

pub async fn kill(&mut self) -> Result<()>

End the owned child and wait until it has been reaped.

Source

pub fn try_wait(&mut self) -> Result<Option<ExitClassification>>

Read an already-observed host-initiated exit without blocking.

Stderr evidence is best-effort because this synchronous path cannot await the background drain’s completion.

Source

pub async fn wait(&mut self) -> Result<ExitClassification>

Wait for a host-initiated exit and classify it with drained stderr.

Source

pub async fn close(&mut self) -> Result<ExitClassification>

Close with the bounded ladder: end stdin, wait shutdown_timeout for the host’s own exit, SIGTERM, wait SIGTERM_GRACE, SIGKILL, and resolve only on the observed exit; then bound the post-exit stderr drain by STDERR_DRAIN_TIMEOUT. Off Unix the first escalation is the platform kill, the grace only spaces its repeat, and the reap stays unbounded. Escalation reaches an exit and never classifies one: the row is a function of the observed (code, signal).

Trait Implementations§

Source§

impl Debug for MuseChild

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.