logo
pub trait Controller<Body> where
    Body: 'static + Debug
{ fn register_command(
        &self,
        interest: Interest,
        command: Rc<dyn Command<Body> + 'static>
    ); fn execute_command(
        &self,
        notification: Rc<dyn Notification<Body> + 'static>
    ); fn remove_command(&self, interest: &Interest); fn has_command(&self, interest: &Interest) -> bool; }
Expand description

The definition for a PureMVC Controller.

In PureMVC, an Controller implementor follows the ‘Command and Controller’ strategy, and assumes these responsibilities:

Required Methods

Register a particular Command class as the handler for a particular Notification.

Execute the Command previously registered as the handler for Notification’s with the given notification name.

Remove a previously registered Command to Notification mapping.

Check if a Command is registered for a given Notification

Implementations on Foreign Types

Implementors