pub enum DomainCheckError {
InvalidDomain {
domain: String,
reason: String,
},
NetworkError {
message: String,
source: Option<String>,
},
RdapError {
domain: String,
message: String,
status_code: Option<u16>,
},
WhoisError {
domain: String,
message: String,
},
BootstrapError {
tld: String,
message: String,
},
ParseError {
message: String,
content: Option<String>,
},
ConfigError {
message: String,
},
FileError {
path: String,
message: String,
},
Timeout {
operation: String,
duration: Duration,
},
RateLimited {
service: String,
message: String,
retry_after: Option<Duration>,
},
Internal {
message: String,
},
}
Expand description
Main error type for domain checking operations.
This enum covers all possible failure modes in the domain checking process, providing detailed context for debugging and user-friendly error messages.
Variants§
InvalidDomain
Invalid domain name format
NetworkError
Network-related errors (connection, timeout, etc.)
RdapError
RDAP protocol specific errors
WhoisError
WHOIS protocol specific errors
BootstrapError
Bootstrap registry lookup failures
ParseError
JSON parsing errors for RDAP responses
ConfigError
Configuration errors (invalid settings, etc.)
FileError
File I/O errors when reading domain lists
Timeout
Timeout errors when operations take too long
RateLimited
Rate limiting errors when servers reject requests
Internal
Generic internal errors that don’t fit other categories
Implementations§
Source§impl DomainCheckError
impl DomainCheckError
Sourcepub fn invalid_domain<D: Into<String>, R: Into<String>>(
domain: D,
reason: R,
) -> Self
pub fn invalid_domain<D: Into<String>, R: Into<String>>( domain: D, reason: R, ) -> Self
Create a new invalid domain error.
Sourcepub fn network_with_source<M: Into<String>, S: Into<String>>(
message: M,
source: S,
) -> Self
pub fn network_with_source<M: Into<String>, S: Into<String>>( message: M, source: S, ) -> Self
Create a new network error with source information.
Sourcepub fn rdap<D: Into<String>, M: Into<String>>(domain: D, message: M) -> Self
pub fn rdap<D: Into<String>, M: Into<String>>(domain: D, message: M) -> Self
Create a new RDAP error.
Sourcepub fn rdap_with_status<D: Into<String>, M: Into<String>>(
domain: D,
message: M,
status_code: u16,
) -> Self
pub fn rdap_with_status<D: Into<String>, M: Into<String>>( domain: D, message: M, status_code: u16, ) -> Self
Create a new RDAP error with HTTP status code.
Sourcepub fn whois<D: Into<String>, M: Into<String>>(domain: D, message: M) -> Self
pub fn whois<D: Into<String>, M: Into<String>>(domain: D, message: M) -> Self
Create a new WHOIS error.
Sourcepub fn bootstrap<T: Into<String>, M: Into<String>>(tld: T, message: M) -> Self
pub fn bootstrap<T: Into<String>, M: Into<String>>(tld: T, message: M) -> Self
Create a new bootstrap error.
Sourcepub fn timeout<O: Into<String>>(operation: O, duration: Duration) -> Self
pub fn timeout<O: Into<String>>(operation: O, duration: Duration) -> Self
Create a new timeout error.
Sourcepub fn file_error<P: Into<String>, M: Into<String>>(path: P, message: M) -> Self
pub fn file_error<P: Into<String>, M: Into<String>>(path: P, message: M) -> Self
Create a new file error.
Sourcepub fn indicates_available(&self) -> bool
pub fn indicates_available(&self) -> bool
Check if this error indicates the domain is definitely available.
Some error conditions (like NXDOMAIN) actually indicate availability.
Sourcepub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
Check if this error suggests the operation should be retried.
Trait Implementations§
Source§impl Clone for DomainCheckError
impl Clone for DomainCheckError
Source§fn clone(&self) -> DomainCheckError
fn clone(&self) -> DomainCheckError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more