pub struct App<CTX, COMP: Component<CTX>> { /* private fields */ }
Expand description
An application instance.
Implementations
sourceimpl<CTX, COMP> App<CTX, COMP>where
CTX: 'static,
COMP: Component<CTX> + Renderable<CTX, COMP>,
impl<CTX, COMP> App<CTX, COMP>where
CTX: 'static,
COMP: Component<CTX> + Renderable<CTX, COMP>,
sourcepub fn reuse(scheduler: &Scheduler<CTX>) -> Self
pub fn reuse(scheduler: &Scheduler<CTX>) -> Self
Creates isolated App
instance, but reuse the context.
sourcepub fn mount_to_body(self) -> Activator<CTX, COMP>
pub fn mount_to_body(self) -> Activator<CTX, COMP>
Alias to mount("body", ...)
.
sourcepub fn mount(self, element: Element) -> Activator<CTX, COMP>
pub fn mount(self, element: Element) -> Activator<CTX, 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<CTX, COMP> !RefUnwindSafe for App<CTX, COMP>
impl<CTX, COMP> !Send for App<CTX, COMP>
impl<CTX, COMP> !Sync for App<CTX, COMP>
impl<CTX, COMP> Unpin for App<CTX, COMP>where
COMP: Unpin,
impl<CTX, COMP> !UnwindSafe for App<CTX, COMP>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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