whois_that/lib.rs
1use thiserror::Error;
2
3pub mod builder;
4pub mod whois;
5
6#[cfg(test)]
7mod tests;
8
9#[derive(Debug, Error)]
10pub enum WhoisError {
11 #[error("Tokio IO Error: {0}")]
12 TokioIO(#[from] tokio::io::Error),
13
14 #[error("IDNA Error: {0}")]
15 IDNA(#[from] idna::Errors),
16
17 #[error("Unable to parse whois data to known encoding")]
18 WhoisData(Vec<u8>),
19
20 #[error("No whois server found for {0} in server list")]
21 WhoisServer(String),
22}