[][src]Struct sauron::Program

pub struct Program<APP, MSG> {
    pub app: Rc<RefCell<APP>>,
    pub dom_updater: Rc<RefCell<DomUpdater<Self, MSG>>>,
}

Holds the app and the dom updater This is passed into the event listener and the dispatch program will be called after the event is triggered.

Fields

app: Rc<RefCell<APP>>dom_updater: Rc<RefCell<DomUpdater<Self, MSG>>>

Methods

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

pub fn new_replace_mount(app: APP, root_node: &Node) -> Rc<Self>[src]

Creates an Rc wrapped instance of Program and mount the app view to the given root_node

pub fn new_append_to_mount(app: APP, root_node: &Node) -> Rc<Self>[src]

pub fn mount_to_body(app: APP) -> Rc<Self>[src]

Instantiate the app and then append it to the document body

Trait Implementations

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

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

Auto Trait Implementations

impl<APP, MSG> !Send for Program<APP, MSG>

impl<APP, MSG> !Sync for Program<APP, MSG>

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]