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
76
//! Data structures for BitTorrent tracker operations.
//!
//! This module contains all the struct definitions used throughout the tracker,
//! including core identifier types, peer information, and request structures.
/// Main tracker instance struct.
///
/// The central struct that holds all tracker state including configuration,
/// database connections, torrents, users, and statistics.
/// Announce request query parameters.
///
/// Represents the parsed query string from an announce request containing
/// info hash, peer ID, port, and transfer statistics.
/// 20-byte torrent info hash identifier.
///
/// A wrapper around `[u8; 20]` that implements common traits for use as
/// a map key and for serialization.
/// 20-byte peer identifier.
///
/// A wrapper around `[u8; 20]` representing the unique peer ID sent by
/// BitTorrent clients in announce requests.
/// Scrape request query parameters.
///
/// Represents the parsed query string from a scrape request containing
/// one or more info hashes to query.
/// Torrent metadata and peer collections.
///
/// Contains the seeds and peers maps for a torrent, along with completion
/// count and last update timestamp.
/// Individual peer information.
///
/// Contains peer connection details including address, port, transfer stats,
/// and the last announce event.
/// User account entry data.
///
/// Stores per-user statistics including upload/download totals, completion
/// count, and active torrent tracking.
/// 20-byte user identifier.
///
/// A wrapper around `[u8; 20]` used to identify user accounts for
/// private tracker functionality.
/// Separated IPv4/IPv6 peer collections.
///
/// Contains separate maps for IPv4 and IPv6 seeds and peers, used when
/// returning peers from announce requests.
/// Sharded torrent storage.
///
/// Implements 256-shard distribution of torrents for concurrent access
/// with minimal lock contention.
/// Cleanup operation statistics.
///
/// Tracks the number of torrents, seeds, and peers removed during
/// periodic cleanup operations.