pub trait Require<P>where
P: Port + 'static,{
// Required method
fn handle(
&mut self,
event: <P as Port>::Indication,
) -> Result<Handled, HandlerError>;
}Expand description
A trait implementing handling of required events of P
This is equivalent to a Kompics Handler subscribed on a required port of type P.
Required Methods§
Sourcefn handle(
&mut self,
event: <P as Port>::Indication,
) -> Result<Handled, HandlerError>
fn handle( &mut self, event: <P as Port>::Indication, ) -> 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.