Type Alias forest_filecoin::libp2p_bitswap::behaviour::BitswapBehaviourEvent
source · pub type BitswapBehaviourEvent = Event<Vec<BitswapMessage>, ()>;
Expand description
libp2p
swarm network behavior event of bitswap
Aliased Type§
enum BitswapBehaviourEvent {
Message {
peer: PeerId,
message: Message<Vec<BitswapMessage>, ()>,
},
OutboundFailure {
peer: PeerId,
request_id: OutboundRequestId,
error: OutboundFailure,
},
InboundFailure {
peer: PeerId,
request_id: InboundRequestId,
error: InboundFailure,
},
ResponseSent {
peer: PeerId,
request_id: InboundRequestId,
},
}
Variants§
Message
An incoming message (request or response).
Fields
§
message: Message<Vec<BitswapMessage>, ()>
The incoming message.
OutboundFailure
An outbound request failed.
Fields
§
request_id: OutboundRequestId
The (local) ID of the failed request.
§
error: OutboundFailure
The error that occurred.
InboundFailure
An inbound request failed.
Fields
§
request_id: InboundRequestId
The ID of the failed inbound request.
§
error: InboundFailure
The error that occurred.
ResponseSent
A response to an inbound request has been sent.
When this event is received, the response has been flushed on the underlying transport connection.
Fields
§
request_id: InboundRequestId
The ID of the inbound request whose response was sent.