logo
pub trait Command<Body>: Debug where
    Body: 'static + Debug
{ fn execute(&self, notification: Rc<dyn Notification<Body> + 'static>); }
Expand description

The definition for a PureMVC Command.

Required Methods

Execute the Command’s logic to handle a given Notification.

Implementations on Foreign Types

Execute this MacroCommand’s SubCommands.

The SubCommands will be called in First In/First Out (FIFO) order.

Fulfill the use-case initiated by the given Notification.

In the Command Pattern, an application use-case typically begins with some user action, which results in an Notification being broadcast, which is handled by business logic in the execute method of an Command.

Implementors