pub struct App<COMP: Component> { /* private fields */ }Expand description
An application instance.
Implementations§
Source§impl<COMP> App<COMP>where
COMP: Component + Renderable<COMP>,
impl<COMP> App<COMP>where
COMP: Component + Renderable<COMP>,
Sourcepub fn mount_to_body(self) -> Scope<COMP>
pub fn mount_to_body(self) -> Scope<COMP>
Alias to mount("body", ...).
Sourcepub fn mount_to_selector(self, selector: &str) -> Scope<COMP>
pub fn mount_to_selector(self, selector: &str) -> Scope<COMP>
Alias to mount() that allows using a selector
Sourcepub fn mount_with_props(
self,
element: Element,
props: COMP::Properties,
) -> Scope<COMP>
pub fn mount_with_props( self, element: Element, props: COMP::Properties, ) -> Scope<COMP>
Alias to mount() that allows passing in initial props
Sourcepub fn mount(
self,
element: Element,
props: Option<COMP::Properties>,
) -> Scope<COMP>
pub fn mount( self, element: Element, props: Option<COMP::Properties>, ) -> Scope<COMP>
The main entrypoint of a yew program. It works similar as program
function in Elm. You should provide an initial model, update function
which will update the state of the model and a view function which
will render the model to a virtual DOM tree.
Auto Trait Implementations§
impl<COMP> Freeze for App<COMP>
impl<COMP> !RefUnwindSafe for App<COMP>
impl<COMP> !Send for App<COMP>
impl<COMP> !Sync for App<COMP>
impl<COMP> Unpin for App<COMP>
impl<COMP> !UnwindSafe for App<COMP>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more