pub trait Command {
type Input;
type Output;
// Required methods
fn prelude(&self, context: Context) -> Result<Self::Input>
where Self: Sized;
fn apply(self, context: Context, input: Self::Input) -> Result<Self::Output>
where Self: Sized;
// Provided methods
fn log_span(&self) -> Span { ... }
fn execute(self, context: Context) -> Result<Self::Output>
where Self: Sized { ... }
fn try_execute(self, context: Context) -> Result<()>
where Self: Sized { ... }
}
Expand description
Base trait for the Leo CLI, see methods and their documentation for details.
Required Associated Types§
Required Methods§
Provided Methods§
Sourcefn log_span(&self) -> Span
fn log_span(&self) -> Span
Adds a span to the logger via tracing::span
.
Because of the specifics of the macro implementation, it is not possible
to set the span name with a non-literal i.e. a dynamic variable even if this
variable is a &’static str.