-
Generate code for
libp2p-swarm
'sFromSwarm::NewExternalAddrOfPeer
enum variant. See PR 4371. -
Restore support for generic constraints on behaviours combined with
out_event
generated byNetworkBehaviour
where no where clause is used. See PR 5003.
- Always forward all variants of
FromSwarm
. See PR 4825.
- Adapt to interface changes in
libp2p-swarm
. See PR 4706. - Remove supported for deprecated
#[behaviour(out_event = "...")]
. To same functionality is available using#[behaviour(to_swarm = "...")]
See PR 4737.
-
Fix
NetworkBehaviour
Derive macro for generic types whenout_event
was not provided. Previously the enum generated didn't have theNetworkBehaviour
impl constraints whilst using the generics for<Generic>::OutEvent
. See PR 3393. -
Replace
NetworkBehaviour
Derive macro deprecatedinject_*
method implementations with the newon_swarm_event
andon_connection_handler_event
. See PR 3011 and PR 3264.
-
Add
prelude
configuration option. The derive-macro generates code that needs to refer to various symbols. See PR 3055. -
Update
rust-version
to reflect the actual MSRV: 1.60.0. See PR 3090.
- Fix an issue where the derive would generate bad code if the type parameters between the behaviour and a custom out event differed. See PR 2907.
- Fix an issue where the derive would generate incorrect code depending on available imports. See PR 2921.
-
Remove support for removed
NetworkBehaviourEventProcess
. See PR 2840. -
Remove support for custom
poll
method onNetworkBehaviour
via#[behaviour(poll_method = "poll")]
. See PR 2841.
- Remove support for non-
NetworkBehaviour
fields on mainstruct
via#[behaviour(ignore)]
. See PR 2842.
- Generate
NetworkBehaviour::OutEvent
if not provided through#[behaviour(out_event = "MyOutEvent")]
and event processing is disabled (default).
- Import
ListenerId
fromlibp2p::core::transport
. See PR 2652.
- Replace references of Protocol Handler with Connection Handler. See PR 2640.
- Allow mixing of ignored fields. See PR 2570.
- Adjust to latest changes in
libp2p-swarm
.
-
Remove unnecessary clone of error in
inject_dial_failure
(see PR 2349). -
Migrate to Rust edition 2021 (see PR 2339).
- Adjust to advanced dialing requests API changes (see PR 2317).
-
Update to latest
libp2p-swarm
changes (see PR 2191). -
Make
event_process = false
the default.
- Handle
NetworkBehaviourAction::CloseConnection
. See PR 2110 for details.
- Extend
NetworkBehaviour
callbacks, more concretely introducing newfn inject_new_listener
andfn inject_expired_external_addr
and havefn inject_{new,expired}_listen_addr
provide aListenerId
PR 2011.
- Rename the crate to
libp2p-swarm-derive
.
- Update for compatibility with
libp2p-swarm-0.25
.
- Generate fully-qualified method name for
poll
to avoid ambiguity. PR 1681.
- Allow users to opt out of the
NetworkBehaviourEventProcess
mechanism through#[behaviour(event_process = false)]
. This is useful if users want to process all events while polling the swarm throughSwarmEvent::Behaviour
.