[−][src]Struct euca::app::AppBuilder
Struct used to configure and attach an application to the DOM.
Implementations
impl<Message, Command, Processor, Router> AppBuilder<Message, Command, Processor, Router> where
Command: SideEffect<Message> + 'static,
Processor: Processor<Message, Command> + 'static,
Router: Route<Message> + 'static,
[src]
Command: SideEffect<Message> + 'static,
Processor: Processor<Message, Command> + 'static,
Router: Route<Message> + 'static,
#[must_use]pub fn router<R: Route<Message>>(
self,
router: R
) -> AppBuilder<Message, Command, Processor, R>
[src]
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.
#[must_use]pub fn clear(self) -> Self
[src]
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.
#[must_use]pub fn attach<Model, DomTree, Key>(
self,
parent: Element,
model: Model
) -> Rc<RefCell<Box<dyn Application<Message, Command>>>> where
Model: Update<Message, Command> + Render<DomTree> + 'static,
DomTree: DomIter<Message, Command, Key> + 'static,
Message: Debug + Clone + PartialEq + 'static,
Command: SideEffect<Message> + Debug + 'static,
Key: Eq + Hash + 'static,
[src]
self,
parent: Element,
model: Model
) -> Rc<RefCell<Box<dyn Application<Message, Command>>>> where
Model: Update<Message, Command> + Render<DomTree> + 'static,
DomTree: DomIter<Message, Command, Key> + 'static,
Message: Debug + Clone + PartialEq + 'static,
Command: SideEffect<Message> + Debug + 'static,
Key: Eq + Hash + 'static,
Attach an app to the dom.
The app will be attached at the given parent node and initialized with the given model. Event handlers will be registered as necessary.
Trait Implementations
impl<Message, Command> Default for AppBuilder<Message, Command, DefaultProcessor<Message, Command>, ()> where
Command: SideEffect<Message>,
[src]
Command: SideEffect<Message>,
Auto Trait Implementations
impl<Message, Command, Processor, Router> !RefUnwindSafe for AppBuilder<Message, Command, Processor, Router>
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> where
Command: Unpin,
Message: Unpin,
Processor: Unpin,
Command: Unpin,
Message: Unpin,
Processor: Unpin,
impl<Message, Command, Processor, Router> UnwindSafe for AppBuilder<Message, Command, Processor, Router> where
Command: UnwindSafe,
Message: UnwindSafe,
Processor: UnwindSafe,
Router: RefUnwindSafe,
Command: UnwindSafe,
Message: UnwindSafe,
Processor: UnwindSafe,
Router: RefUnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.