#[non_exhaustive]pub enum Error {
Transport {
server: String,
source: Box<dyn Error + Send + Sync>,
},
Decode {
server: String,
source: Error,
},
Status {
server: String,
status: u16,
target: String,
},
Refused {
server: String,
reason: String,
},
TooLarge {
server: String,
limit: usize,
},
NoServer {
target: String,
},
NotPublic {
target: String,
},
Dns {
name: String,
source: Box<dyn Error + Send + Sync>,
},
Validation(ValidationError),
}Expand description
A lookup that did not finish.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Transport
The request did not complete: DNS, TLS, connection or timeout.
Fields
Decode
The body was not the RDAP this crate expects.
Status
The server answered, and the answer was not a record.
Fields
Refused
The client did not send the request, or did not follow a redirect.
A link in a record and a redirect from a server come from outside the process. The client refuses one that goes to an address that is not public, uses a scheme other than HTTP or HTTPS, drops from HTTPS to HTTP, or redirects too many times.
TooLarge
The server sent a body longer than the crate reads.
A record is a few kilobytes. A body past the limit is a fault on the server, or a server that tries to use up the memory of the process.
NoServer
No registry holds the address or the name.
The bootstrap registry names a server for every range IANA has given out. A target with no server is a private address, a reserved range, or a name under a top-level domain that runs no RDAP server.
NotPublic
The address is not one the public registries describe.
A regional registry holds a record for the reserved block a private address sits in, and that record names IANA. Answering with it gives a contact that cannot act, so the lookup stops here instead.
Dns
A DNS lookup did not finish.
A name that does not exist, or that holds no records of the type asked for, is an answer and not this error. This is a lookup that got no answer: a timeout, a server that failed, or a resolver configuration the system could not read.
Fields
Validation(ValidationError)
A value did not satisfy a documented limit.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<ValidationError> for Error
impl From<ValidationError> for Error
Source§fn from(source: ValidationError) -> Self
fn from(source: ValidationError) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Freeze for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more