struct Behaviour{
kademlia:Kademlia<MemoryStore>
}
let behaviour: Behaviour = Behaviour{
kademlia,
};
let transport = development_transport(local_key).await?;
let mut swarm = SwarmBuilder::with_async_std_executor(transport, behaviour, local_peer_id).build();
But the compiler reminds me that
is not satisfied
the following other types implement trait NetworkBehaviour
:
Kademlia
Toggle
libp2p::libp2p_allow_block_list::Behaviour
libp2p::libp2p_connection_limits::Behaviour
libp2p::libp2p_ping::Behaviour
libp2p::libp2p_swarm::derive_prelude::Either<L, R>
libp2p::libp2p_swarm::dummy::Behaviour
libp2p::libp2p_swarm::keep_alive::Behaviour
Then I add #[derive(NetworkBehaviour)] but it does not work!!!