Skip to content

Commit f61c7c3

Browse files
committed
docs: add commments to core::Tracker struct fields
1 parent 5a16ea1 commit f61c7c3

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/core/mod.rs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,15 +481,26 @@ use crate::CurrentClock;
481481
/// > Typically, the `Tracker` is used by a higher application service that handles
482482
/// > the network layer.
483483
pub struct Tracker {
484-
// The tracker configuration.
484+
/// The tracker configuration.
485485
config: Core,
486+
486487
/// A database driver implementation: [`Sqlite3`](crate::core::databases::sqlite)
487488
/// or [`MySQL`](crate::core::databases::mysql)
488489
database: Arc<Box<dyn Database>>,
490+
491+
/// Tracker users' keys. Only for private trackers.
489492
keys: tokio::sync::RwLock<std::collections::HashMap<Key, auth::ExpiringKey>>,
493+
494+
/// The list of allowed torrents. Only for listed trackers.
490495
whitelist: tokio::sync::RwLock<std::collections::HashSet<InfoHash>>,
496+
497+
/// The in-memory torrents repository.
491498
torrents: Arc<Torrents>,
499+
500+
/// Service to send stats events.
492501
stats_event_sender: Option<Box<dyn statistics::EventSender>>,
502+
503+
/// The in-memory stats repo.
493504
stats_repository: statistics::Repo,
494505
}
495506

0 commit comments

Comments
 (0)