[−][src]Struct euca::component::ComponentBuilder
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]
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,
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]
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.