[−][src]Struct kayrx_ui::fabric::prelude::App
An application instance.
Methods
impl<COMP> App<COMP> where
COMP: Component,
<COMP as Component>::Properties: Default,
[src]
COMP: Component,
<COMP as Component>::Properties: Default,
pub fn mount(self, element: Element) -> Scope<COMP>
[src]
The main entrypoint of a yew program. It works similarly to the 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. If you would like to pass props,
use the mount_with_props
method.
pub fn mount_to_body(self) -> Scope<COMP>
[src]
Alias to mount("body", ...)
.
pub fn mount_as_body(self) -> Scope<COMP>
[src]
Alternative to mount
which replaces the body element with a component which has a body
element at the root of the HTML generated by its view
method. Use this method when you
need to manipulate the body element. For example, adding/removing app-wide
CSS classes of the body element.
impl<COMP> App<COMP> where
COMP: Component,
[src]
COMP: Component,
pub fn new() -> App<COMP>
[src]
Creates a new App
with a component in a context.
pub fn mount_with_props(
self,
element: Element,
props: <COMP as Component>::Properties
) -> Scope<COMP>
[src]
self,
element: Element,
props: <COMP as Component>::Properties
) -> Scope<COMP>
The main entrypoint of a yew program which also allows passing properties. It works
similarly to the 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.
pub fn mount_to_body_with_props(
self,
props: <COMP as Component>::Properties
) -> Scope<COMP>
[src]
self,
props: <COMP as Component>::Properties
) -> Scope<COMP>
Alias to mount_with_props("body", ...)
.
pub fn mount_as_body_with_props(
self,
props: <COMP as Component>::Properties
) -> Scope<COMP>
[src]
self,
props: <COMP as Component>::Properties
) -> Scope<COMP>
Alternative to mount_with_props
which replaces the body element with a component which
has a body element at the root of the HTML generated by its view
method. Use this method
when you need to manipulate the body element. For example, adding/removing app-wide
CSS classes of the body element.
Trait Implementations
impl<COMP> Debug for App<COMP> where
COMP: Component + Debug,
[src]
COMP: Component + Debug,
impl<COMP> Default for App<COMP> where
COMP: Component,
[src]
COMP: Component,
Auto Trait Implementations
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
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Any for T where
T: Any,
T: Any,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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>,