ping/errors.rs
1use thiserror::Error;
2
3#[derive(Debug, Error)]
4pub enum Error {
5 #[error("invalid procotol")]
6 InvalidProtocol,
7 #[error("internal error")]
8 InternalError,
9 #[error("Decode V4 error occurred while processing the IPv4 packet.")]
10 DecodeV4Error,
11 #[error("Decode echo reply error occurred while processing the ICMP echo reply.")]
12 DecodeEchoReplyError,
13 #[error("io error: {error}")]
14 IoError {
15 #[from]
16 #[source]
17 error: ::std::io::Error,
18 },
19}