Trait domafic::processors::ListenerProcessor
[−]
[src]
pub trait ListenerProcessor<'a, Message> { type Acc; type Error; fn get_processor<T: Listener<Message>>(
) -> fn(_: &mut Self::Acc, _: &'a T) -> Result<(), Self::Error>; }
ListenerProcessor
s are used to iterate over Listeners
s which may or may not be the same
type. Implementations of this trait resemble traditional fold
functions, modifying an
accumulator (of type Acc
) and returning an error as necessary.
Associated Types
type Acc
Type of the accumulator updated by get_processor
type Error
Type of error returned by failed calls to get_processor
Required Methods
fn get_processor<T: Listener<Message>>(
) -> fn(_: &mut Self::Acc, _: &'a T) -> Result<(), Self::Error>
) -> fn(_: &mut Self::Acc, _: &'a T) -> Result<(), Self::Error>
Returns a folding function capable of processing elements of type T: DomNode
.
TODO: Example