mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-05-10 18:07:19 +00:00
20 lines
331 B
Rust
20 lines
331 B
Rust
|
use libp2p_ping as ping;
|
||
|
|
||
|
#[derive(libp2p_swarm::NetworkBehaviour)]
|
||
|
#[behaviour(out_event = FooEvent, prelude = "libp2p_swarm::derive_prelude")]
|
||
|
struct Foo {
|
||
|
ping: ping::Behaviour,
|
||
|
}
|
||
|
|
||
|
struct FooEvent;
|
||
|
|
||
|
impl From<ping::Event> for FooEvent {
|
||
|
fn from(_: ping::Event) -> Self {
|
||
|
unimplemented!()
|
||
|
}
|
||
|
}
|
||
|
|
||
|
fn main() {
|
||
|
|
||
|
}
|