Trait cargo_test_support::TestEnvCommandExt

source ·
pub trait TestEnvCommandExt: Sized {
    // Required methods
    fn current_dir<S: AsRef<Path>>(self, path: S) -> Self;
    fn env<S: AsRef<OsStr>>(self, key: &str, value: S) -> Self;
    fn env_remove(self, key: &str) -> Self;

    // Provided method
    fn test_env(self) -> Self { ... }
}
Expand description

Establish a process’s test environment

Required Methods§

source

fn current_dir<S: AsRef<Path>>(self, path: S) -> Self

source

fn env<S: AsRef<OsStr>>(self, key: &str, value: S) -> Self

source

fn env_remove(self, key: &str) -> Self

Provided Methods§

source

fn test_env(self) -> Self

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl TestEnvCommandExt for Command

source§

fn current_dir<S: AsRef<Path>>(self, path: S) -> Self

source§

fn env<S: AsRef<OsStr>>(self, key: &str, value: S) -> Self

source§

fn env_remove(self, key: &str) -> Self

Implementors§