1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use std::num::ParseIntError;

use thiserror::Error;

pub type Result<T> = std::result::Result<T, Error>;

#[derive(Error, Debug)]
pub enum Error {
    #[error("{0}")]
    Io(#[from] std::io::Error),
    #[error("{0}")]
    ParseInt(#[from] ParseIntError),
    #[error("{0}")]
    AddressParse(#[from] std::net::AddrParseError),
    #[error("{0}")]
    Poll(#[from] errno::Errno),
}