hopr_transport_probe/
errors.rs1use libp2p_identity::PeerId;
2use thiserror::Error;
3
4#[derive(Error, Debug)]
5pub enum ProbeError {
6 #[error("the network operation timed out after {0} seconds")]
7 Timeout(u64),
8
9 #[error("error while decoding message data")]
10 DecodingError,
11
12 #[error("peer does not exist")]
13 NonExistingPeer,
14
15 #[error("error while pinging peer {0}: {1}")]
16 PingerError(PeerId, String),
17
18 #[error("error sending probe: {0}")]
19 SendError(String),
20}
21
22pub type Result<T> = core::result::Result<T, ProbeError>;