[][src]Trait sauron::Dispatch

pub trait Dispatch<MSG> {
    fn dispatch(&self, msg: MSG);
}

This trait is used in the DomUpdater to call the dispatch method when an event occured

The Program will implement Dispatch instead of sending it to the DomUpdater, this will simplify the amount of generics being defined.

Required methods

fn dispatch(&self, msg: MSG)

Executes the implementing dispatch function. In this case the implementation is the Program which is responsible for executing the update functions using the msg supplied. A new view will then be created and it will be diff to the previous view which will produce patches. These patched will then be applied to the browser DOM.

Loading content...

Implementors

impl<APP, MSG> Dispatch<MSG> for Program<APP, MSG> where
    APP: Component<MSG> + 'static,
    MSG: 'static, 
[src]

This will be called when the actual event is triggered. Defined in the DomUpdater::create_closure_wrap function

Loading content...