Trait libp2p::swarm::NetworkBehaviourEventProcess
source · [−]pub trait NetworkBehaviourEventProcess<TEvent> {
fn inject_event(&mut self, event: TEvent);
}
Expand description
When deriving NetworkBehaviour
this trait must by default be implemented for all the
possible event types generated by the inner behaviours.
You can opt out of this behaviour through #[behaviour(event_process = false)]
. See the
documentation of NetworkBehaviour
for details.
Required methods
fn inject_event(&mut self, event: TEvent)
fn inject_event(&mut self, event: TEvent)
Called when one of the fields of the type you’re deriving NetworkBehaviour
on generates
an event.