pub trait Handler<A>where
A: Send + 'static,{
// Required method
fn message_received(&mut self, context: &Context<A>, message: &Message);
}
Expand description
A trait for the ability to process messages in the context of a looper
Objects that implement this trait, can be added to the messaging queues of loopers.
Required Methods§
Sourcefn message_received(&mut self, context: &Context<A>, message: &Message)
fn message_received(&mut self, context: &Context<A>, message: &Message)
Handle a message
When a Looper receives a message, this method is called for you to handle it. TODO: Example