Skip to content

Commit 8675d6b

Browse files
committed
docs: [#589] add todo for TrackerMode
1 parent 6c98e2b commit 8675d6b

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

src/config/mod.rs

+25-1
Original file line numberDiff line numberDiff line change
@@ -134,17 +134,41 @@ impl From<ConfigError> for Error {
134134
}
135135
}
136136

137+
/* todo:
138+
139+
Use https://crates.io/crates/torrust-tracker-primitives for TrackerMode.
140+
141+
Enum variants (Index -> Tracker):
142+
143+
- `Public` -> `Public`
144+
- `Private` -> `Private`
145+
- `Whitelisted` -> `Listed`
146+
- `PrivateWhitelisted` -> `PrivateListed`
147+
148+
Enum serialized values (Index -> Tracker):
149+
150+
- `Public` -> `public`
151+
- `Private` -> `private`
152+
- `Whitelisted` -> `listed`
153+
- `PrivateWhitelisted` -> `private_listed`
154+
155+
It's a breaking change for the toml config file en the API.
156+
157+
*/
158+
137159
/// See `TrackerMode` in [`torrust-tracker-primitives`](https://docs.rs/torrust-tracker-primitives)
138160
/// crate for more information.
139161
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
140162
pub enum TrackerMode {
141-
// todo: use https://crates.io/crates/torrust-tracker-primitives
142163
/// Will track every new info hash and serve every peer.
143164
Public,
165+
144166
/// Will only serve authenticated peers.
145167
Private,
168+
146169
/// Will only track whitelisted info hashes.
147170
Whitelisted,
171+
148172
/// Will only track whitelisted info hashes and serve authenticated peers.
149173
PrivateWhitelisted,
150174
}

0 commit comments

Comments
 (0)