irontide_tracker/
error.rs1pub type Result<T> = std::result::Result<T, Error>;
3
4#[derive(Debug, thiserror::Error)]
6pub enum Error {
7 #[error("tracker returned error: {0}")]
9 TrackerError(String),
10
11 #[error("invalid tracker response: {0}")]
13 InvalidResponse(String),
14
15 #[error("UDP protocol error: {0}")]
17 UdpProtocol(String),
18
19 #[error("connection timed out")]
21 Timeout,
22
23 #[error("bencode: {0}")]
25 Bencode(#[from] irontide_bencode::Error),
26
27 #[error("HTTP: {0}")]
29 Http(#[from] reqwest::Error),
30
31 #[error("I/O: {0}")]
33 Io(#[from] std::io::Error),
34
35 #[error("invalid URL: {0}")]
37 InvalidUrl(String),
38
39 #[error("URL security policy violation: {0}")]
41 SecurityViolation(String),
42}