[][src]Struct euca::app::AppBuilder

pub struct AppBuilder<Message, Command, Processor, Router> where
    Command: SideEffect<Message>,
    Processor: Processor<Message, Command>,
    Router: Route<Message>, 
{ /* fields omitted */ }

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]

#[must_use]pub fn router<R: Route<Message>>(
    self,
    router: R
) -> AppBuilder<Message, Command, Processor, R>
[src]

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]

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]

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

impl<Message, Command, Processor, Router> UnwindSafe for AppBuilder<Message, Command, Processor, Router> where
    Command: UnwindSafe,
    Message: UnwindSafe,
    Processor: UnwindSafe,
    Router: RefUnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<M> Update<(), ()> for M[src]