logo
pub trait View<Body> where
    Body: 'static + Debug
{ fn register_observer(
        &self,
        interest: Interest,
        observer: Rc<dyn Observer<Body> + 'static>
    ); fn remove_observer(
        &self,
        interest: &Interest,
        notify_context: &Rc<dyn NotifyContext + 'static>
    ); fn notify(&self, note: Rc<dyn Notification<Body> + 'static>); }
Expand description

The definition for a PureMVC View.

In PureMVC, the View class assumes these responsibilities:

Required Methods

Register an Observer to be notified of Notification’s with a given name.

Remove a group of observers from the observer list for a given Notification name.

Notify the Observer’s for a particular Notification.

All previously attached Observer’s for this Notification’s list are notified and are passed a reference to the Notification in the order in which they were registered.

Implementations on Foreign Types

Notify the Observer’s for a particular Notification.

All previously attached Observer’s for this Notification’s list are notified and are passed a reference to the Notification in the order in which they were registered.

NOTE: Use this method only if you are sending custom Notifications. Otherwise use the sendNotification method which does not require you to create the Notification instance.

Implementors