1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
use std::io;
use derive_more::{Display, From};
use trust_dns_resolver::error::ResolveError;
#[derive(Debug, From, Display)]
pub enum ConnectError {
#[display(fmt = "Failed resolving hostname: {}", _0)]
Resolver(ResolveError),
#[display(fmt = "No dns records found for the input")]
NoRecords,
InvalidInput,
#[display(fmt = "Connector received `Connect` method with unresolved host")]
Unresolved,
#[display(fmt = "{}", _0)]
Io(io::Error),
}