[−][src]Trait seed::dom_types::MessageMapper
Associated Types
type SelfWithOtherMs
Required methods
fn map_message(
self,
f: impl FnOnce(Ms) -> OtherMs + 'static + Clone
) -> Self::SelfWithOtherMs
self,
f: impl FnOnce(Ms) -> OtherMs + 'static + Clone
) -> Self::SelfWithOtherMs
Implementations on Foreign Types
impl<Ms: 'static, OtherMs: 'static> MessageMapper<Ms, OtherMs> for Vec<Node<Ms>>
[src]
type SelfWithOtherMs = Vec<Node<OtherMs>>
fn map_message(
self,
f: impl FnOnce(Ms) -> OtherMs + 'static + Clone
) -> Vec<Node<OtherMs>>
[src]
self,
f: impl FnOnce(Ms) -> OtherMs + 'static + Clone
) -> Vec<Node<OtherMs>>
impl<Ms: 'static, OtherMs: 'static> MessageMapper<Ms, OtherMs> for Vec<El<Ms>>
[src]
type SelfWithOtherMs = Vec<El<OtherMs>>
fn map_message(
self,
f: impl FnOnce(Ms) -> OtherMs + 'static + Clone
) -> Vec<El<OtherMs>>
[src]
self,
f: impl FnOnce(Ms) -> OtherMs + 'static + Clone
) -> Vec<El<OtherMs>>
Implementors
impl<Ms: 'static, OtherMs: 'static> MessageMapper<Ms, OtherMs> for Node<Ms>
[src]
type SelfWithOtherMs = Node<OtherMs>
fn map_message(
self,
f: impl FnOnce(Ms) -> OtherMs + 'static + Clone
) -> Node<OtherMs>
[src]
self,
f: impl FnOnce(Ms) -> OtherMs + 'static + Clone
) -> Node<OtherMs>
See note on impl for El
impl<Ms: 'static, OtherMs: 'static> MessageMapper<Ms, OtherMs> for El<Ms>
[src]
type SelfWithOtherMs = El<OtherMs>
fn map_message(
self,
f: impl FnOnce(Ms) -> OtherMs + 'static + Clone
) -> El<OtherMs>
[src]
self,
f: impl FnOnce(Ms) -> OtherMs + 'static + Clone
) -> El<OtherMs>
Maps an element's message to have another message.
This allows third party components to integrate with your application without having to know about your Msg type beforehand.
Note
There is an overhead to calling this versus keeping all messages under one type. The deeper the nested structure of children, the more time this will take to run.
impl<Ms: 'static, OtherMs: 'static> MessageMapper<Ms, OtherMs> for LifecycleHooks<Ms>
[src]
type SelfWithOtherMs = LifecycleHooks<OtherMs>
fn map_message(
self,
f: impl FnOnce(Ms) -> OtherMs + 'static + Clone
) -> Self::SelfWithOtherMs
[src]
self,
f: impl FnOnce(Ms) -> OtherMs + 'static + Clone
) -> Self::SelfWithOtherMs
impl<Ms: 'static, OtherMs: 'static> MessageMapper<Ms, OtherMs> for Listener<Ms>
[src]
type SelfWithOtherMs = Listener<OtherMs>
fn map_message(
self,
f: impl FnOnce(Ms) -> OtherMs + 'static + Clone
) -> Listener<OtherMs>
[src]
self,
f: impl FnOnce(Ms) -> OtherMs + 'static + Clone
) -> Listener<OtherMs>