Struct Launch

Source
pub struct Launch<'a> { /* private fields */ }
Expand description

Builder that can be used to customize the launch of an application.

Implementations§

Source§

impl<'a> Launch<'a>

Source

pub fn wait_for_debugger(&mut self, wait: bool) -> &mut Launch<'a>

Indicates whether the application should wait for a debugger to attach.

Source

pub fn use_pty(&mut self, use_pty: bool) -> &mut Launch<'a>

Indicates whether the output should be written to a console with PTY.

Source

pub fn stdout<P>(&mut self, path: &'a P) -> &mut Launch<'a>
where P: AsRef<Path>,

Writes stdout to the given path.

Source

pub fn stderr<P>(&mut self, path: &'a P) -> &mut Launch<'a>
where P: AsRef<Path>,

Writes stderr to the given path.

Source

pub fn arg<S>(&mut self, arg: &'a S) -> &mut Launch<'a>
where S: AsRef<OsStr>,

Adds an argument that will be passed to the program.

Source

pub fn env<K, V>(&mut self, key: K, value: &'a V) -> &mut Launch<'a>
where K: Display, V: AsRef<OsStr>,

Adds an environment variable that will be made available to the program.

Source

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

Executes the launch.

Trait Implementations§

Source§

impl<'a> Debug for Launch<'a>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for Launch<'a>

§

impl<'a> RefUnwindSafe for Launch<'a>

§

impl<'a> Send for Launch<'a>

§

impl<'a> Sync for Launch<'a>

§

impl<'a> Unpin for Launch<'a>

§

impl<'a> UnwindSafe for Launch<'a>

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.