[][src]Struct euca::component::ComponentBuilder

pub struct ComponentBuilder<Message, Command, ParentMessage> { /* fields omitted */ }

A builder for constructing a self contained component app that lives inside of another app.

Implementations

impl<Message, Command, ParentMessage> ComponentBuilder<Message, Command, ParentMessage>[src]

#[must_use]pub fn map(self, f: fn(_: ParentMessage) -> Option<Message>) -> Self[src]

A function to optionally map a message from the parent to the component.

#[must_use]pub fn unmap(self, f: fn(_: Command) -> Option<ParentMessage>) -> Self[src]

A funciton to optionally map a command from the component to the parent.

#[must_use]pub fn create<ParentCommand, Model, DomTree, K>(
    self,
    model: Model,
    parent_app: Dispatcher<ParentMessage, ParentCommand>
) -> Box<dyn Component<ParentMessage>> where
    ParentMessage: Debug + Clone + PartialEq + 'static,
    ParentCommand: SideEffect<ParentMessage> + 'static,
    Message: Debug + Clone + PartialEq + 'static,
    Command: SideEffect<Message> + Debug + Clone + 'static,
    Model: Update<Message, Command> + Render<DomTree> + 'static,
    DomTree: DomIter<Message, Command, K> + 'static,
    K: Eq + Hash + 'static, 
[src]

Create a component from the given app, and it's parent.

Trait Implementations

impl<Message, Command, ParentMessage> Default for ComponentBuilder<Message, Command, ParentMessage>[src]

Auto Trait Implementations

impl<Message, Command, ParentMessage> RefUnwindSafe for ComponentBuilder<Message, Command, ParentMessage>

impl<Message, Command, ParentMessage> Send for ComponentBuilder<Message, Command, ParentMessage>

impl<Message, Command, ParentMessage> Sync for ComponentBuilder<Message, Command, ParentMessage>

impl<Message, Command, ParentMessage> Unpin for ComponentBuilder<Message, Command, ParentMessage>

impl<Message, Command, ParentMessage> UnwindSafe for ComponentBuilder<Message, Command, ParentMessage>

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]