pub trait Task {
type Context;
type Error;
// Required methods
fn verb(&self) -> &str;
fn message(&self) -> &str;
fn detail(&self) -> &str;
fn run(
&self,
context: Self::Context,
manager: &mut Manager<'_>,
) -> Result<Self::Context, Self::Error>;
}Expand description
Represents an individual task that a CLI command is composed of.
Required Associated Types§
Required Methods§
Sourcefn verb(&self) -> &str
fn verb(&self) -> &str
The verb that describes this task (e.g. “Launching” or “Building”) that is shown to the user while the task is running.
Sourcefn message(&self) -> &str
fn message(&self) -> &str
The message that is shown to the user alongside the verb. This usually starts with a lowercase letter (e.g. “[Generating] source tree”).