1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// Copyright 2019-2026 ChainSafe Systems
// SPDX-License-Identifier: Apache-2.0, MIT
//! Another libp2p
//! bitswap([SPEC](https://github.com/ipfs/specs/blob/main/BITSWAP.md))
//! implementation in Rust.
//!
//! ## Features
//!
//! - Compatible with [`go-bitswap`](https://github.com/ipfs/go-bitswap)
//! - Optional request manager
//! - Prometheus metrics
//!
//! ## Usage
//!
//! Basic usage of `BitswapBehaviour`, for writing swarm event flow, sending or
//! receiving a request or a response, checkout `tests/go_compat.rs`. Note that a
//! request manager is needed for a real-world application.
//!
//! To use the builtin request manager that is optimized for Filecoin network, a
//! data store that implements `BitswapStoreRead` and `BitswapStoreReadWrite` is
//! required. For hooking request manager in swarm event flow, requesting a block
//! via request manager API, checkout `tests/request_manager.rs`.
use Result as IOResult;
use Cid;
use *;
use *;
pub use *;
pub use *;
pub use register_metrics;
pub use *;