#[non_exhaustive]pub enum RecursorError {
MaxRecordLimitExceeded {
count: usize,
record_type: RecordType,
},
Message(&'static str),
Msg(String),
Negative(AuthorityData),
ForwardNS(Arc<[ForwardNSData]>),
Io(Error),
Net(NetError),
Timeout,
RecursionLimitExceeded {
count: usize,
},
}recursor only.Expand description
The error kind for errors that get returned in the crate
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
MaxRecordLimitExceeded
Maximum record limit was exceeded
Fields
record_type: RecordTypeThe record type that triggered the error.
Message(&'static str)
An error with an arbitrary message, referenced as &’static str
Msg(String)
An error with an arbitrary message, stored as String
Negative(AuthorityData)
Upstream DNS authority returned an empty RRset
ForwardNS(Arc<[ForwardNSData]>)
Upstream DNS authority returned a referral to another set of nameservers in the form of additional NS records.
Io(Error)
An error got returned from IO
Net(NetError)
An error got returned by the hickory-proto crate
Timeout
A request timed out
RecursionLimitExceeded
Could not fetch all records because a recursion limit was exceeded
Implementations§
Source§impl RecursorError
impl RecursorError
Sourcepub fn recursion_exceeded(limit: u8, depth: u8, name: &Name) -> Result<(), Self>
pub fn recursion_exceeded(limit: u8, depth: u8, name: &Name) -> Result<(), Self>
Test if the recursion depth has been exceeded, and return an error if it has.
Sourcepub fn into_soa(self) -> Option<Box<Record<SOA>>>
pub fn into_soa(self) -> Option<Box<Record<SOA>>>
Returns the SOA record, if the error contains one
Sourcepub fn is_no_records_found(&self) -> bool
pub fn is_no_records_found(&self) -> bool
Returns true if no records were returned
Sourcepub fn is_nx_domain(&self) -> bool
pub fn is_nx_domain(&self) -> bool
Returns true if the domain does not exist
Sourcepub fn is_timeout(&self) -> bool
pub fn is_timeout(&self) -> bool
Returns true if a query timed out
Trait Implementations§
Source§impl Clone for RecursorError
impl Clone for RecursorError
Source§impl Debug for RecursorError
impl Debug for RecursorError
Source§impl Display for RecursorError
impl Display for RecursorError
Source§impl Error for RecursorError
impl Error for RecursorError
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<&'static str> for RecursorError
impl From<&'static str> for RecursorError
Source§impl From<Error> for RecursorError
impl From<Error> for RecursorError
Source§impl From<NetError> for RecursorError
impl From<NetError> for RecursorError
Source§impl From<ProtoError> for RecursorError
impl From<ProtoError> for RecursorError
Source§fn from(e: ProtoError) -> Self
fn from(e: ProtoError) -> Self
Source§impl From<RecursorError> for NetError
impl From<RecursorError> for NetError
Source§fn from(e: RecursorError) -> Self
fn from(e: RecursorError) -> Self
Auto Trait Implementations§
impl !Freeze for RecursorError
impl !RefUnwindSafe for RecursorError
impl Send for RecursorError
impl Sync for RecursorError
impl Unpin for RecursorError
impl UnsafeUnpin for RecursorError
impl !UnwindSafe for RecursorError
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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