logo
pub trait Model {
    fn register_proxy<P>(&self, proxy: Rc<P>)
    where
        P: Proxy
; fn retrieve_proxy<P>(&self) -> Option<Rc<P>>
    where
        P: Proxy
; fn remove_proxy<P>(&self) -> Option<Rc<P>>
    where
        P: Proxy
; fn has_proxy<P>(&self) -> bool
    where
        P: Proxy
; }
Expand description

The definition for a PureMVC Model.

In PureMVC, Model implementors provide access to Proxy objects by named lookup.

An Model assumes these responsibilities:

  • Maintain a cache of Proxy instances
  • Provide methods for registering, retrieving, and removing Proxy instances

Required Methods

Register an Proxy instance with the Model.

Retrieve an Proxy instance from the Model.

Remove an Proxy instance from the Model.

Check if a Proxy is registered

Implementations on Foreign Types

Check if a Proxy is registered

Register an Proxy with the Model by name.

Remove an Proxy instance from the Model by name.

Retrieve a Proxy from the Model by name.

Implementors