pub struct AppBuilder<Message, Command, Processor, Router>{ /* private fields */ }Expand description
Struct used to configure and attach an application to the DOM.
Implementations§
Source§impl<Message, Command, Processor, Router> AppBuilder<Message, Command, Processor, Router>where
Command: SideEffect<Message> + 'static,
Processor: Processor<Message, Command> + 'static,
Router: Route<Message> + 'static,
impl<Message, Command, Processor, Router> AppBuilder<Message, Command, Processor, Router>where
Command: SideEffect<Message> + 'static,
Processor: Processor<Message, Command> + 'static,
Router: Route<Message> + 'static,
Sourcepub fn router<R: Route<Message>>(
self,
router: R,
) -> AppBuilder<Message, Command, Processor, R>
pub fn router<R: Route<Message>>( self, router: R, ) -> AppBuilder<Message, Command, Processor, R>
Handle popstate and hashchange events for this app.
The router will need to implement the Route trait.
Sourcepub fn clear(self) -> Self
pub fn clear(self) -> Self
Remove all children from the parent when attaching the app.
This is useful for displaying fallback text or a loading screen that will then be removed when the app is attached.
Trait Implementations§
Source§impl<Message, Command> Default for AppBuilder<Message, Command, DefaultProcessor<Message, Command>, ()>where
Command: SideEffect<Message>,
impl<Message, Command> Default for AppBuilder<Message, Command, DefaultProcessor<Message, Command>, ()>where
Command: SideEffect<Message>,
Auto Trait Implementations§
impl<Message, Command, Processor, Router> Freeze for AppBuilder<Message, Command, Processor, Router>where
Processor: Freeze,
impl<Message, Command, Processor, Router> RefUnwindSafe for AppBuilder<Message, Command, Processor, Router>where
Processor: RefUnwindSafe,
Message: RefUnwindSafe,
Command: RefUnwindSafe,
Router: RefUnwindSafe,
impl<Message, Command, Processor, Router> !Send for AppBuilder<Message, Command, Processor, Router>
impl<Message, Command, Processor, Router> !Sync for AppBuilder<Message, Command, Processor, Router>
impl<Message, Command, Processor, Router> Unpin for AppBuilder<Message, Command, Processor, Router>
impl<Message, Command, Processor, Router> UnwindSafe for AppBuilder<Message, Command, Processor, Router>
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
Source§impl<M> Update<()> for M
impl<M> Update<()> for M
Source§fn update(&mut self, msg: Message, _commands: &mut Commands<Command>)
fn update(&mut self, msg: Message, _commands: &mut Commands<Command>)
Update the model using the given message. Implement this to describe the behavior of your
app.
Source§fn simple_update(&mut self, _msg: Message)
fn simple_update(&mut self, _msg: Message)
Update the model using the given message. Implement this if your app does not need to use
side effecting commands.