swarm/src/behaviour: Deprecate NetworkBehaviourEventProcess (#2784)

In preparation for https://github.com/libp2p/rust-libp2p/pull/2751.
This commit is contained in:
Max Inden
2022-08-16 06:58:17 +02:00
committed by GitHub
parent 0e5a25dea8
commit 878c49fa14
9 changed files with 267 additions and 164 deletions

View File

@ -79,9 +79,7 @@ async fn main() -> Result<(), Box<dyn Error>> {
let floodsub_topic = floodsub::Topic::new("chat");
// We create a custom network behaviour that combines floodsub and mDNS.
// In the future, we want to improve libp2p to make this easier to do.
// Use the derive to generate delegating NetworkBehaviour impl and require the
// NetworkBehaviourEventProcess implementations below.
// Use the derive to generate delegating NetworkBehaviour impl.
#[derive(NetworkBehaviour)]
#[behaviour(out_event = "OutEvent")]
struct MyBehaviour {