[−][src]Struct sauron::Program
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]
MSG: Debug + Clone + 'static,
APP: Component<MSG> + 'static,
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]
MSG: Debug + Clone + 'static,
APP: Component<MSG> + 'static,
This will be called when the actual event is triggered. Defined in the DomUpdater::create_closure_wrap function
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,