[−][src]Struct seed::AppBuilder
Used to create and store initial app configuration, ie items passed by the app creator
Methods
impl<Ms, Mdl, ElC: View<Ms> + 'static, GMs: 'static> Builder<Ms, Mdl, ElC, GMs>
[src]
pub fn mount(self, mount_point: impl MountPoint) -> Self
[src]
Choose the element where the application will be mounted.
The default one is the element with id
= "app".
Examples
// argument is `&str` mount("another_id") // argument is `HTMLElement` // NOTE: Be careful with mounting into body, // it can cause hard-to-debug bugs when there are other scripts in the body. mount(seed::body()) // argument is `Element` mount(seed::body().querySelector("section").unwrap().unwrap())
pub fn routes(self, routes: fn(_: Url) -> Option<Ms>) -> Self
[src]
Registers a function which maps URLs to messages.
pub fn window_events(self, evts: fn(_: &Mdl) -> Vec<Listener<Ms>>) -> Self
[src]
Registers a function which decides how window events will be handled.
pub fn sink(
self,
sink: fn(_: GMs, _: &mut Mdl, _: &mut OrdersContainer<Ms, Mdl, ElC, GMs>)
) -> Self
[src]
self,
sink: fn(_: GMs, _: &mut Mdl, _: &mut OrdersContainer<Ms, Mdl, ElC, GMs>)
) -> Self
Registers a sink function.
The sink function is a function which can update the model based on global messages. Consider to use a sink function when a submodule needs to trigger changes in other modules.
pub fn finish(self) -> App<Ms, Mdl, ElC, GMs>
[src]
Deprecated since 0.4.2:
Please use .build_and_start
instead
pub fn build_and_start(self) -> App<Ms, Mdl, ElC, GMs>
[src]
Build and run the app.
Auto Trait Implementations
impl<Ms, Mdl, ElC, GMs> !Send for Builder<Ms, Mdl, ElC, GMs>
impl<Ms, Mdl, ElC, GMs> !Sync for Builder<Ms, Mdl, ElC, GMs>
impl<Ms, Mdl, ElC, GMs> Unpin for Builder<Ms, Mdl, ElC, GMs>
impl<Ms, Mdl, ElC, GMs> !UnwindSafe for Builder<Ms, Mdl, ElC, GMs>
impl<Ms, Mdl, ElC, GMs> !RefUnwindSafe for Builder<Ms, Mdl, ElC, GMs>
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> 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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,