Struct ruex::foundation::patterns::facade::BaseFacade
source · [−]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:
- Initializing the Model, View and Controller Singletons.
- Providing all the methods defined by the Model, View, & Controller interfaces.
- Providing a single point of contact to the application for registering Command’s and notifying Observer’s
Implementations
Trait Implementations
sourceimpl<Body> Facade<Body> for BaseFacade<Body> where
Body: Debug + 'static,
impl<Body> Facade<Body> for BaseFacade<Body> where
Body: Debug + 'static,
sourcefn has_command(&self, interest: &Interest) -> bool
fn has_command(&self, interest: &Interest) -> bool
Check if a Command is registered for a given Notification Read more
sourcefn register_command(&self, interest: Interest, command: Rc<dyn Command<Body>>)
fn register_command(&self, interest: Interest, command: Rc<dyn Command<Body>>)
Register an Command with the Controller. Read more
sourcefn remove_command(&self, interest: &Interest)
fn remove_command(&self, interest: &Interest)
Remove a previously registered Command to Notification mapping from the Controller. Read more
sourceimpl<Body> MediatorRegistry<Body> for BaseFacade<Body> where
Body: Debug + 'static,
impl<Body> MediatorRegistry<Body> for BaseFacade<Body> where
Body: Debug + 'static,
sourcefn register_mediator<M: Mediator<Body>>(&self, mediator: Rc<M>)
fn register_mediator<M: Mediator<Body>>(&self, mediator: Rc<M>)
sourcefn retrieve_mediator<M: Mediator<Body>>(&self) -> Option<Rc<M>>
fn retrieve_mediator<M: Mediator<Body>>(&self) -> Option<Rc<M>>
sourcefn remove_mediator<M: Mediator<Body>>(&self) -> Option<Rc<M>>
fn remove_mediator<M: Mediator<Body>>(&self) -> Option<Rc<M>>
sourcefn has_mediator<M: Mediator<Body>>(&self) -> bool
fn has_mediator<M: Mediator<Body>>(&self) -> bool
Check if a Mediator is registered or not
sourceimpl<Body> Model for BaseFacade<Body> where
Body: Debug + 'static,
impl<Body> Model for BaseFacade<Body> where
Body: Debug + 'static,
sourcefn remove_proxy<P: Proxy>(&self) -> Option<Rc<P>>
fn remove_proxy<P: Proxy>(&self) -> Option<Rc<P>>
sourceimpl<Body> Singleton for BaseFacade<Body> where
Body: Debug + 'static,
impl<Body> Singleton for BaseFacade<Body> where
Body: Debug + 'static,
sourceimpl<Body> View<Body> for BaseFacade<Body> where
Body: Debug + 'static,
impl<Body> View<Body> for BaseFacade<Body> where
Body: Debug + 'static,
sourcefn notify(&self, note: Rc<dyn Notification<Body>>)
fn notify(&self, note: Rc<dyn Notification<Body>>)
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.
sourcefn register_observer(
&self,
interest: Interest,
observer: Rc<dyn Observer<Body>>
)
fn register_observer(
&self,
interest: Interest,
observer: Rc<dyn Observer<Body>>
)
Register an Observer to be notified of Notification’s with a given name.
sourcefn remove_observer(
&self,
interest: &Interest,
notify_context: &Rc<dyn NotifyContext>
)
fn remove_observer(
&self,
interest: &Interest,
notify_context: &Rc<dyn NotifyContext>
)
Remove a group of observers from the observer list for a given Notification name.
Auto Trait Implementations
impl<Body> !RefUnwindSafe for BaseFacade<Body>
impl<Body> Send for BaseFacade<Body>
impl<Body> Sync for BaseFacade<Body>
impl<Body> Unpin for BaseFacade<Body>
impl<Body> !UnwindSafe for BaseFacade<Body>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more