Struct up_rs::tasks::task::Task[][src]

pub struct Task {
    pub name: String,
    pub path: PathBuf,
    pub config: TaskConfig,
    pub start_time: Instant,
    pub status: TaskStatus,
}

Fields

name: Stringpath: PathBufconfig: TaskConfigstart_time: Instantstatus: TaskStatus

Implementations

impl Task[src]

pub fn from(path: &Path) -> Result<Self>[src]

pub fn try_start<F>(
    &mut self,
    env_fn: F,
    env: &HashMap<String, String>
) -> Result<()> where
    F: Fn(&str) -> Result<String>, 
[src]

pub fn start<F>(
    &mut self,
    env_fn: F,
    env: &HashMap<String, String>
) -> Result<()> where
    F: Fn(&str) -> Result<String>, 
[src]

pub fn try_finish(&mut self) -> Result<()>[src]

If command has completed set output state.

pub fn run_check_cmd(
    &self,
    cmd: &[String],
    env: &HashMap<String, String>
) -> Result<Output>
[src]

pub fn start_command(
    cmd: &[String],
    env: &HashMap<String, String>
) -> Result<(Child, Instant)>
[src]

pub fn get_command(
    cmd: &[String],
    env: &HashMap<String, String>
) -> Result<Command>
[src]

pub fn log_command_output(
    &self,
    command_type: CommandType,
    status: ExitStatus,
    stdout: &str,
    stderr: &str,
    elapsed_time: Duration
)
[src]

Trait Implementations

impl Debug for Task[src]

Auto Trait Implementations

impl !RefUnwindSafe for Task

impl Send for Task

impl Sync for Task

impl Unpin for Task

impl !UnwindSafe for Task

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> Instrument for T[src]

impl<T> Instrument for T[src]

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

impl<T> Pointable for T

type Init = T

The type for initializers.

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.