kitsune_p2p_bootstrap/
error.rs

1#[derive(Debug, thiserror::Error)]
2pub enum BootstrapClientError {
3    /// std::io::Error
4    #[error(transparent)]
5    StdIoError(#[from] std::io::Error),
6
7    /// Reqwest crate.
8    #[error(transparent)]
9    Reqwest(#[from] reqwest::Error),
10
11    /// Bootstrap call failed.
12    #[error("Bootstrap Error: {0}")]
13    Bootstrap(Box<str>),
14
15    /// Integer casting failed.
16    #[error(transparent)]
17    TryFromInt(#[from] std::num::TryFromIntError),
18
19    /// SystemTime call failed.
20    #[error(transparent)]
21    SystemTime(#[from] std::time::SystemTimeError),
22}
23
24pub type BootstrapClientResult<T> = Result<T, BootstrapClientError>;