forked from torrust/torrust-tracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlib.rs
More file actions
75 lines (71 loc) · 3.02 KB
/
Copy pathlib.rs
File metadata and controls
75 lines (71 loc) · 3.02 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
//! Primitive types for [Torrust Tracker](https://docs.rs/torrust-tracker).
//!
//! This module contains the basic data structures for the [Torrust Tracker](https://docs.rs/torrust-tracker),
//! which is a `BitTorrent` tracker server. These structures are used not only
//! by the tracker server crate, but also by other crates in the Torrust
//! ecosystem.
pub mod announce;
pub mod configuration_instance_id;
pub mod driver;
pub mod mode;
pub mod number_of_bytes;
pub mod pagination;
pub mod peer;
#[deprecated(
since = "3.0.0-develop",
note = "import peer ID types from `torrust_peer_id` crate instead; \
this module will be removed in a future release (see EPIC #1669)"
)]
pub mod peer_id;
pub mod policy;
pub mod scrape;
pub mod service_role;
pub mod swarm_metadata;
use std::collections::BTreeMap;
pub use announce::{AnnounceData, AnnounceEvent, AnnouncePolicy};
pub use configuration_instance_id::ConfigurationInstanceId;
pub use driver::Driver;
pub use mode::PrivateMode;
pub use number_of_bytes::NumberOfBytes;
pub use policy::TrackerPolicy;
pub use scrape::ScrapeData;
pub use service_role::ServiceRole;
/// Duration since the Unix Epoch.
///
/// **Deprecated**: import from [`torrust_clock::DurationSinceUnixEpoch`] instead.
/// This re-export is kept for backwards compatibility and will be removed in a
/// future release. Removal is tracked as a follow-up cleanup subissue of EPIC
/// [#1669](https://github.com/torrust/torrust-tracker/issues/1669).
#[deprecated(
since = "3.0.0-develop",
note = "import `DurationSinceUnixEpoch` from `torrust_clock` instead; \
this re-export will be removed in a future release (see EPIC #1669)"
)]
pub use torrust_clock::DurationSinceUnixEpoch;
use torrust_info_hash::InfoHash;
/// **Deprecated**: import from [`torrust_peer_id`] instead via the [`peer_id`] module.
/// This re-export is kept for backwards compatibility and will be removed in a
/// future release. Removal is tracked as a follow-up cleanup subissue of EPIC
/// [#1669](https://github.com/torrust/torrust-tracker/issues/1669).
#[deprecated(
since = "3.0.0-develop",
note = "import peer ID types from `torrust_peer_id` crate instead; \
this re-export will be removed in a future release (see EPIC #1669)"
)]
pub use torrust_peer_id::{PeerClient, PeerId};
/// Network service binding types.
///
/// **Deprecated**: import from [`torrust_net_primitives::service_binding`] instead.
/// This re-export is kept for backwards compatibility and will be removed in a
/// future release. Removal is tracked as a follow-up cleanup subissue of EPIC
/// [#1669](https://github.com/torrust/torrust-tracker/issues/1669).
#[deprecated(
since = "3.0.0-develop",
note = "import `service_binding` types from `torrust_net_primitives` instead; \
this re-export will be removed in a future release (see EPIC #1669)"
)]
pub mod service_binding {
pub use torrust_net_primitives::service_binding::*;
}
pub type NumberOfDownloads = u32;
pub type NumberOfDownloadsPerInfoHash = BTreeMap<InfoHash, NumberOfDownloads>;