pub trait Command<T: Terminal> {
type Context;
type Error;
// Required method
fn apply(
&mut self,
looper: &mut Looper<'_, Self::Context, Self::Error, T>,
) -> Result<ApplyOutcome, ApplyCommandError<Self::Error>>;
}Expand description
The definition of an executable command.
T is the terminal type.
Required Associated Types§
Required Methods§
Sourcefn apply(
&mut self,
looper: &mut Looper<'_, Self::Context, Self::Error, T>,
) -> Result<ApplyOutcome, ApplyCommandError<Self::Error>>
fn apply( &mut self, looper: &mut Looper<'_, Self::Context, Self::Error, T>, ) -> Result<ApplyOutcome, ApplyCommandError<Self::Error>>
Applies the command for the given Looper. References to the underlying application
context and the terminal interface are supplied by the Looper.
§Errors
ApplyCommandError if the command could not be executed.