mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-13 01:51:23 +00:00
swarm: Remove NotifyHandler::All (#1880)
Remove `NotifyHandler::All` thus removing the requirement for events send from a `NetworkBehaviour` to a `ProtocolsHandler` to be `Clone`. An implementor of `NetworkBehaviour` can still notify all `ProtocolHandler`s for a given peer by emitting one `NotifyHandler` event per connection to that peer.
This commit is contained in:
@ -329,7 +329,7 @@ impl From<ProtocolsHandlerUpgrErr<io::Error>> for KademliaHandlerQueryErr {
|
||||
}
|
||||
|
||||
/// Event to send to the handler.
|
||||
#[derive(Debug, Clone)]
|
||||
#[derive(Debug)]
|
||||
pub enum KademliaHandlerIn<TUserData> {
|
||||
/// Resets the (sub)stream associated with the given request ID,
|
||||
/// thus signaling an error to the remote.
|
||||
@ -429,7 +429,7 @@ pub enum KademliaHandlerIn<TUserData> {
|
||||
|
||||
/// Unique identifier for a request. Must be passed back in order to answer a request from
|
||||
/// the remote.
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
#[derive(Debug, PartialEq, Eq)]
|
||||
pub struct KademliaRequestId {
|
||||
/// Unique identifier for an incoming connection.
|
||||
connec_unique_id: UniqueConnecId,
|
||||
|
@ -118,7 +118,7 @@ where
|
||||
/// Request substream upgrade protocol.
|
||||
///
|
||||
/// Sends a request and receives a response.
|
||||
#[derive(Debug, Clone)]
|
||||
#[derive(Debug)]
|
||||
pub struct RequestProtocol<TCodec>
|
||||
where
|
||||
TCodec: RequestResponseCodec
|
||||
|
Reference in New Issue
Block a user