Trait sauron::prelude::AttributeMapMsg [−][src]
pub trait AttributeMapMsg<MSG> where
MSG: 'static, { fn map_msg<F, MSG2>(
self,
func: F
) -> Attribute<&'static str, &'static str, AttributeValue, Callback<Event, MSG2>>
where
MSG2: 'static,
F: Fn(MSG) -> MSG2 + 'static; fn map_callback<MSG2>(
self,
cb: Callback<MSG, MSG2>
) -> Attribute<&'static str, &'static str, AttributeValue, Callback<Event, MSG2>>
where
MSG2: 'static; fn get_callback(&self) -> Vec<&Callback<Event, MSG>, Global>ⓘ; }
Expand description
Add mapping function for Attribute
Required methods
map the msg
fn map_callback<MSG2>(
self,
cb: Callback<MSG, MSG2>
) -> Attribute<&'static str, &'static str, AttributeValue, Callback<Event, MSG2>> where
MSG2: 'static,
fn map_callback<MSG2>(
self,
cb: Callback<MSG, MSG2>
) -> Attribute<&'static str, &'static str, AttributeValue, Callback<Event, MSG2>> where
MSG2: 'static,
transform the callback of this attribute