kcp_sys/error.rs
1#[derive(Debug, thiserror::Error)]
2pub enum Error {
3 #[error("Invalid state")]
4 InvalidState,
5 #[error("Invalid state need reset")]
6 InvalidStateNeedRst,
7 #[error("Connection reset")]
8 ConnectioinReset,
9 #[error("Create connection failed")]
10 CreateConnectionFailed,
11 #[error("Anyhow error")]
12 AnyhowError(#[from] anyhow::Error),
13
14 #[error("Connect timeout")]
15 ConnectTimeout,
16
17 #[error("Shutdown")]
18 Shutdown,
19}