logo
pub struct BaseFacade<Body> where
    Body: Debug + 'static, 
{ /* private fields */ }
Expand description

A base Singleton Facade implementation.

In PureMVC, the Facade class assumes these responsibilities:

Implementations

Create instance of BaseFacade.

Actually, you have to reimplement the Facade for your purposes with Singleton pattern.

This Facade implementation is keept here in educational purposes only.

Trait Implementations

Check if a Command is registered for a given Notification Read more

Register an Command with the Controller. Read more

Remove a previously registered Command to Notification mapping from the Controller. Read more

Create and send an Notification. Read more

Register an Mediator instance with the View.

Retrieve an Mediator instance from the View.

Remove a Mediator instance from the View.

Check if a Mediator is registered or not

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.

Facade Singleton Factory method

It is not possible to implement Singleton with generics. So you should implement it in your final code only.

Error: use of generic parameter from outer function

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.

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.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.