[][src]Struct cargo_task::cargo_task_util::CTEnv

pub struct CTEnv {
    pub cargo_path: PathBuf,
    pub cargo_task_path: PathBuf,
    pub cargo_task_target: PathBuf,
    pub work_dir: PathBuf,
    pub task_list: Vec<String>,
    pub arg_list: Vec<String>,
    pub tasks: BTreeMap<String, CTTaskMeta>,
}

Cargo-task environment info struct.

Fields

cargo_path: PathBuf

The path to the cargo binary.

cargo_task_path: PathBuf

The .cargo-task directory.

cargo_task_target: PathBuf

The targe dir for cargo-task builds.

work_dir: PathBuf

The root of the cargo task execution environment.

task_list: Vec<String>

Task list specified by user.

arg_list: Vec<String>

Additional arguments specified by user.

tasks: BTreeMap<String, CTTaskMeta>

All tasks defined in the task directory.

Implementations

impl CTEnv[src]

pub fn cargo(&self) -> Command[src]

Create a new cargo std::process::Command

pub fn exec(&self, cmd: Command) -> Result<()>[src]

Execute a rust std::process::Command

pub fn set_env<N: AsRef<str>, V: AsRef<str>>(&self, name: N, val: V)[src]

Export an environment variable up to the parent task runner env. Also sets the varible in the current environment.

Trait Implementations

impl Debug for CTEnv[src]

Auto Trait Implementations

impl RefUnwindSafe for CTEnv

impl Send for CTEnv

impl Sync for CTEnv

impl Unpin for CTEnv

impl UnwindSafe for CTEnv

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.