Registry / networking / libp2p-swarm-derive

libp2p-swarm-derive

JSON →
library0.35.1rscratesunverified

Procedural macros of libp2p-swarm.

# Cargo.toml [dependencies] libp2p-swarm-derive = "0.35.1"
INSTALL
IMPORT
SIG · LIBP2P-SWARM-DERIV
L
libp2p-swarm-derive
networkingrustv0.35.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

NetworkBehaviour
use libp2p_swarm_derive::NetworkBehaviour;

Derives the NetworkBehaviour trait for a custom struct.

use libp2p_swarm_derive::NetworkBehaviour; #[derive(NetworkBehaviour)] struct MyBehaviour { // fields } fn main() {}
Debug
Known issues
gotchaRequires the `libp2p-swarm` crate and its dependencies.
fix
Add `libp2p-swarm` to Cargo.toml.
affects: >=0.35.0
Upgrade
Version history
0.35.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
8
Resources
libp2p-swarm-derive — cargo add libp2p-swarm-derive · libregistry