mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-23 14:51:34 +00:00
swarm/behaviour: Remove deprecated NetworkBehaviourEventProcess (#2840)
Removes the `NetworkBehaviourEventProcess` and all its associated logic. See deprecation pull request https://github.com/libp2p/rust-libp2p/pull/2784. Find rational in https://github.com/libp2p/rust-libp2p/pull/2751.
This commit is contained in:
@ -321,24 +321,6 @@ pub trait PollParameters {
|
||||
fn local_peer_id(&self) -> &PeerId;
|
||||
}
|
||||
|
||||
/// 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.
|
||||
#[deprecated(
|
||||
since = "0.38.0",
|
||||
note = "Use `#[behaviour(out_event = \"MyBehaviourEvent\")]` instead. See \
|
||||
https://github.com/libp2p/rust-libp2p/blob/master/swarm/CHANGELOG.md#0380 \
|
||||
for instructions on how to migrate. Will be removed with \
|
||||
https://github.com/libp2p/rust-libp2p/pull/2751."
|
||||
)]
|
||||
pub trait NetworkBehaviourEventProcess<TEvent> {
|
||||
/// Called when one of the fields of the type you're deriving `NetworkBehaviour` on generates
|
||||
/// an event.
|
||||
fn inject_event(&mut self, event: TEvent);
|
||||
}
|
||||
|
||||
/// An action that a [`NetworkBehaviour`] can trigger in the [`Swarm`]
|
||||
/// in whose context it is executing.
|
||||
///
|
||||
|
Reference in New Issue
Block a user