Struct StdChild

Source
pub struct StdChild(pub Child);
Available on crate feature std only.
Expand description

A thin wrapper around Child.

This is used only because implementing StdChildWrapper directly on std’s Child creates loops in the type system. It is not intended to be used directly, but only to be used internally by the library.

Tuple Fields§

§0: Child

Trait Implementations§

Source§

impl Debug for StdChild

Source§

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

Formats the value using the given formatter. Read more
Source§

impl StdChildWrapper for StdChild

Source§

fn inner(&self) -> &Child

Available on crate feature downcasting only.
Obtain a reference to the underlying Child.
Source§

fn inner_mut(&mut self) -> &mut Child

Available on crate feature downcasting only.
Obtain a mutable reference to the underlying Child.
Source§

fn into_inner(self: Box<Self>) -> Child

Available on crate feature downcasting only.
Consume the wrapper and return the underlying Child. Read more
Source§

fn try_clone(&self) -> Option<Box<dyn StdChildWrapper>>

Available on crate feature downcasting only.
Obtain a clone if possible. Read more
Source§

fn stdin(&mut self) -> &mut Option<ChildStdin>

Available on crate feature downcasting only.
Obtain the Child’s stdin. Read more
Source§

fn stdout(&mut self) -> &mut Option<ChildStdout>

Available on crate feature downcasting only.
Obtain the Child’s stdout. Read more
Source§

fn stderr(&mut self) -> &mut Option<ChildStderr>

Available on crate feature downcasting only.
Obtain the Child’s stderr. Read more
Source§

fn id(&self) -> u32

Available on crate feature downcasting only.
Obtain the Child’s process ID. Read more
Source§

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

Available on crate feature downcasting only.
Kill the Child and wait for it to exit. Read more
Source§

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

Available on crate feature downcasting only.
Kill the Child without waiting for it to exit. Read more
Source§

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

Available on crate feature downcasting only.
Check if the Child has exited without blocking, and if so, return its exit status. Read more
Source§

fn wait(&mut self) -> Result<ExitStatus>

Available on crate feature downcasting only.
Wait for the Child to exit and return its exit status. Read more
Source§

fn wait_with_output(self: Box<Self>) -> Result<Output>
where Self: 'static,

Available on crate feature downcasting only.
Wait for the Child to exit and return its exit status and outputs. Read more
Source§

fn signal(&self, sig: i32) -> Result<()>

Available on crate feature downcasting and Unix only.
Send a signal to the Child. 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> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more