Skip to main content

Provide

Trait Provide 

Source
pub trait Provide<P>
where P: Port + 'static,
{ // Required method fn handle( &mut self, event: <P as Port>::Request, ) -> Result<Handled, HandlerError>; }
Expand description

A trait implementing handling of provided events of P

This is equivalent to a Kompics Handler subscribed on a provided port of type P.

Required Methods§

Source

fn handle( &mut self, event: <P as Port>::Request, ) -> Result<Handled, HandlerError>

Handle the port’s event

§Note

Remember that components usually run on a shared thread pool, so you shouldn’t ever block in this method unless you know what you are doing.

Implementors§