torrust_tracker_primitives/
lib.rs

1//! Primitive types for [Torrust Tracker](https://docs.rs/torrust-tracker).
2//!
3//! This module contains the basic data structures for the [Torrust Tracker](https://docs.rs/torrust-tracker),
4//! which is a `BitTorrent` tracker server. These structures are used not only
5//! by the tracker server crate, but also by other crates in the Torrust
6//! ecosystem.
7use std::collections::BTreeMap;
8use std::time::Duration;
9
10use info_hash::InfoHash;
11
12pub mod info_hash;
13pub mod pagination;
14pub mod peer;
15pub mod swarm_metadata;
16pub mod torrent_metrics;
17
18/// Duration since the Unix Epoch.
19pub type DurationSinceUnixEpoch = Duration;
20
21pub type PersistentTorrents = BTreeMap<InfoHash, u32>;