CheckedChild

Struct CheckedChild 

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

A wrapper around std::process::Child which hides the original wait/wait_with_output methods and replaces it with the versions from checked_command::ChildExt

Implementations§

Source§

impl CheckedChild

Source

pub fn as_std_command(&mut self) -> &mut Child

returns a mutable reference to the wrapped child

Source

pub fn into_std_command(self) -> Child

converts the checked child into a std::process::Child note that a Into<Child> implementation is not provided.

Source

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

return a optional &mut to the childs Stding

Source

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

return a optional &mut to the childs Stding

Source

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

return a optional &mut to the childs Stding

Source

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

calls std::process::Child::kill

Source

pub fn id(&self) -> u32

calls std::process::Child::id

Source

pub fn wait(&mut self) -> Result<(), Error>

calls ChildExt::checked_wait on the wrapped Child

Source

pub fn wait_with_output(self) -> Result<Output, Error>

calls ChildExt::checked_wait_with_output on the wrapped Child

Trait Implementations§

Source§

impl Debug for CheckedChild

Source§

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

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

impl From<Child> for CheckedChild

Source§

fn from(child: Child) -> CheckedChild

Converts to this type from the input type.

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 = 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.