use std::any::Any;
#[derive(Debug)]
pub struct BadDnsNameError;
impl std::fmt::Display for BadDnsNameError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("Bad DNS name")
}
}
impl std::error::Error for BadDnsNameError {}
#[derive(Debug, Error)]
pub enum ShutdownError {
#[error("Thread panicked")]
ThreadJoinError(Box<dyn Any + Send + 'static>),
#[error("During Searchlight thread execution: {0}")]
MultiIpIoError(#[from] MultiIpIoError),
}
#[derive(Debug, Error)]
pub enum MultiIpIoError {
#[error("I/O error: {0}")]
IoError(#[from] std::io::Error),
#[error("I/O error: {0} (IPv4)")]
V4(std::io::Error),
#[error("I/O error: {0} (IPv6)")]
V6(std::io::Error),
#[error("I/O error: {v4} (IPv4) {v6} (IPv6)")]
Both {
v4: std::io::Error,
v6: std::io::Error,
},
}