pub trait NodeMapMsg<MSG>where
    MSG: 'static,{
    // Required methods
    fn map_msg<F, MSG2>(self, func: F) -> Node<MSG2>
       where F: Fn(MSG) -> MSG2 + 'static,
             MSG2: 'static;
    fn map_callback<MSG2>(self, cb: Listener<MSG, MSG2>) -> Node<MSG2>
       where MSG2: 'static;
    fn get_callbacks(&self) -> Vec<&Listener<Event, MSG>>;
}
Expand description

Add mapping function for Node, Element, Attribute,

Required Methods§

source

fn map_msg<F, MSG2>(self, func: F) -> Node<MSG2>where F: Fn(MSG) -> MSG2 + 'static, MSG2: 'static,

map the msg of callback of this node

source

fn map_callback<MSG2>(self, cb: Listener<MSG, MSG2>) -> Node<MSG2>where MSG2: 'static,

map the msg of callback of this element node

source

fn get_callbacks(&self) -> Vec<&Listener<Event, MSG>>

Return the callbacks present on this node

Implementors§

source§

impl<MSG> NodeMapMsg<MSG> for Node<MSG>where MSG: 'static,