Struct conch_runtime::env::EnvConfig [] [src]

pub struct EnvConfig<A, IO, FD, L, V, EX, WD, N, ERR> {
    pub interactive: bool,
    pub args_env: A,
    pub async_io_env: IO,
    pub file_desc_env: FD,
    pub last_status_env: L,
    pub var_env: V,
    pub exec_env: EX,
    pub working_dir_env: WD,
    pub fn_name: PhantomData<N>,
    pub fn_error: PhantomData<ERR>,
}

A struct for configuring a new Env instance.

It implements Default (via DefaultEnvConfig alias) so it is possible to selectively override certain environment modules while retaining the rest of the default implementations.

let lp = tokio_core::reactor::Core::new().unwrap();
let env = Env::with_config(EnvConfig {
    args_env: ArgsEnv::with_name(Rc::new(String::from("my_shell"))),
    .. DefaultEnvConfig::new(lp.remote(), None).expect("failed to create config")
});

assert_eq!(**env.name(), "my_shell");

Fields

Specify if the environment is running in interactive mode.

An implementation of ArgumentsEnvironment and possibly SetArgumentsEnvironment.

An implementation of AsyncIoEnvironment.

An implementation of FileDescEnvironment.

An implementation of LastStatusEnvironment.

An implementation of VariableEnvironment, UnsetVariableEnvironment, and ExportedVariableEnvironment.

An implementation of ExecutableEnvironment.

An implementation of WorkingDirectoryEnvironment.

A marker to indicate the type used for function names.

A marker to indicate the type used for function errors.

Methods

impl<A, IO, FD, L, V, EX, WD, N, ERR> EnvConfig<A, IO, FD, L, V, EX, WD, N, ERR>
[src]

[src]

Change the type of the args_env instance.

[src]

Change the type of the async_io_env instance.

[src]

Change the type of the file_desc_env instance.

[src]

Change the type of the last_status_env instance.

[src]

Change the type of the var_env instance.

[src]

Change the type of the exec_env instance.

[src]

Change the type of the working_dir_env instance.

[src]

Change the type of the fn_name instance.

[src]

Change the type of the fn_error instance.

Trait Implementations

impl<A: Default, IO: Default, FD: Default, L: Default, V: Default, EX: Default, WD: Default, N: Default, ERR: Default> Default for EnvConfig<A, IO, FD, L, V, EX, WD, N, ERR>
[src]

[src]

Returns the "default value" for a type. Read more

impl<A: Debug, IO: Debug, FD: Debug, L: Debug, V: Debug, EX: Debug, WD: Debug, N: Debug, ERR: Debug> Debug for EnvConfig<A, IO, FD, L, V, EX, WD, N, ERR>
[src]

[src]

Formats the value using the given formatter.

impl<A: PartialEq, IO: PartialEq, FD: PartialEq, L: PartialEq, V: PartialEq, EX: PartialEq, WD: PartialEq, N: PartialEq, ERR: PartialEq> PartialEq for EnvConfig<A, IO, FD, L, V, EX, WD, N, ERR>
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl<A: Eq, IO: Eq, FD: Eq, L: Eq, V: Eq, EX: Eq, WD: Eq, N: Eq, ERR: Eq> Eq for EnvConfig<A, IO, FD, L, V, EX, WD, N, ERR>
[src]

impl<A: Clone, IO: Clone, FD: Clone, L: Clone, V: Clone, EX: Clone, WD: Clone, N: Clone, ERR: Clone> Clone for EnvConfig<A, IO, FD, L, V, EX, WD, N, ERR>
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more