re_dev_tools::build_search_index::util

Trait CommandExt

Source
pub trait CommandExt {
    // Required methods
    fn with_cwd<P>(self, cwd: P) -> Self
       where P: AsRef<Path>;
    fn with_arg<S>(self, arg: S) -> Self
       where S: AsRef<OsStr>;
    fn with_args<I, S>(self, args: I) -> Self
       where I: IntoIterator<Item = S>,
             S: AsRef<OsStr>;
    fn with_env<K, V>(self, key: K, val: V) -> Self
       where K: AsRef<OsStr>,
             V: AsRef<OsStr>;
    fn run(self) -> Result<()>;
    fn output(self) -> Result<Vec<u8>>;
    fn parse_json<T>(self) -> Result<T>
       where T: for<'de> Deserialize<'de>;
}

Required Methods§

Source

fn with_cwd<P>(self, cwd: P) -> Self
where P: AsRef<Path>,

Source

fn with_arg<S>(self, arg: S) -> Self
where S: AsRef<OsStr>,

Source

fn with_args<I, S>(self, args: I) -> Self
where I: IntoIterator<Item = S>, S: AsRef<OsStr>,

Source

fn with_env<K, V>(self, key: K, val: V) -> Self
where K: AsRef<OsStr>, V: AsRef<OsStr>,

Source

fn run(self) -> Result<()>

Source

fn output(self) -> Result<Vec<u8>>

Source

fn parse_json<T>(self) -> Result<T>
where T: for<'de> Deserialize<'de>,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl CommandExt for Command

Source§

fn with_cwd<P>(self, cwd: P) -> Self
where P: AsRef<Path>,

Source§

fn with_arg<S>(self, arg: S) -> Self
where S: AsRef<OsStr>,

Source§

fn with_args<I, S>(self, args: I) -> Self
where I: IntoIterator<Item = S>, S: AsRef<OsStr>,

Source§

fn with_env<K, V>(self, key: K, val: V) -> Self
where K: AsRef<OsStr>, V: AsRef<OsStr>,

Source§

fn run(self) -> Result<()>

Source§

fn output(self) -> Result<Vec<u8>>

Source§

fn parse_json<T>(self) -> Result<T>
where T: for<'de> Deserialize<'de>,

Implementors§