Enum ResolveError
#[non_exhaustive]pub enum ResolveError {
Busy,
Dns(DnsError),
Message(&'static str),
Msg(String),
ParseInt(ParseIntError),
NoConnections,
Proto(ProtoError),
Io(Arc<Error>),
Timeout,
QueryCaseMismatch,
ForeignClassRecord {
record_name: Name,
record_class: DNSClass,
record_type: RecordType,
},
Truncated,
}Expand description
The error type for network protocol errors (UDP, TCP, QUIC, H2, H3)
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Busy
The underlying resource is too busy
This is a signal that an internal resource is too busy. The intended action should be tried again, ideally after waiting for a little while for the situation to improve. Alternatively, the action could be tried on another resource (for example, in a name server pool).
Dns(DnsError)
Semantic DNS errors
Message(&'static str)
An error with an arbitrary message, referenced as &’static str
Msg(String)
An error with an arbitrary message, stored as String
ParseInt(ParseIntError)
Unable to parse header value as number
NoConnections
No connections available
Proto(ProtoError)
Protocol error from higher layers
Io(Arc<Error>)
An error got returned from IO
Timeout
A request timed out
QueryCaseMismatch
Case randomization is enabled, and a server did not echo a query name back with the same case.
ForeignClassRecord
An upstream response contained a record whose class did not match the IN query class.
Fields
record_name: NameThe name of the offending record.
record_class: DNSClassThe class of the offending record.
record_type: RecordTypeThe type of the offending record.
Truncated
Received a truncated response
Implementations§
§impl NetError
impl NetError
pub fn is_nx_domain(&self) -> bool
pub fn is_nx_domain(&self) -> bool
Returns true if the domain does not exist
pub fn is_no_records_found(&self) -> bool
pub fn is_no_records_found(&self) -> bool
Returns true if the error represents NoRecordsFound
pub fn is_connection_closed(&self) -> bool
pub fn is_connection_closed(&self) -> bool
Returns true for a transport-level connection error: the connection was closed, reset, or refused, as opposed to a timeout or a server-side (DNS) error.
pub fn as_metrics_label(&self) -> &'static str
pub fn as_metrics_label(&self) -> &'static str
Returns a representative string of the error for use as a metrics label.
Trait Implementations§
§impl Error for NetError
impl Error for NetError
§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()
§impl From<ParseIntError> for NetError
impl From<ParseIntError> for NetError
§fn from(source: ParseIntError) -> NetError
fn from(source: ParseIntError) -> NetError
Auto Trait Implementations§
impl !RefUnwindSafe for NetError
impl !UnwindSafe for NetError
impl Forget for NetError
impl Freeze for NetErrorwhere
*const Query is !null: Freeze,
PhantomData<Query>: Freeze,
*const Record<SOA> is !null: Freeze,
PhantomData<Record<SOA>>: Freeze,
*const ArcInner<[ForwardNSData]> is !null: Freeze,
PhantomData<ArcInner<[ForwardNSData]>>: Freeze,
*const ArcInner<[Record]> is !null: Freeze,
PhantomData<ArcInner<[Record]>>: Freeze,
&'static str: Freeze,
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
*const Name is !null: Freeze,
PhantomData<Name>: Freeze,
*const ProtoError is !null: Freeze,
PhantomData<ProtoError>: Freeze,
*const ArcInner<Error> is !null: Freeze,
PhantomData<ArcInner<Error>>: Freeze,
impl Move for NetError
impl Send for NetError
impl Sync for NetError
impl Unpin for NetError
impl UnsafeUnpin for NetErrorwhere
*const Query is !null: UnsafeUnpin,
PhantomData<Query>: UnsafeUnpin,
*const Record<SOA> is !null: UnsafeUnpin,
PhantomData<Record<SOA>>: UnsafeUnpin,
*const ArcInner<[ForwardNSData]> is !null: UnsafeUnpin,
PhantomData<ArcInner<[ForwardNSData]>>: UnsafeUnpin,
*const ArcInner<[Record]> is !null: UnsafeUnpin,
PhantomData<ArcInner<[Record]>>: UnsafeUnpin,
&'static str: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const Name is !null: UnsafeUnpin,
PhantomData<Name>: UnsafeUnpin,
*const ProtoError is !null: UnsafeUnpin,
PhantomData<ProtoError>: UnsafeUnpin,
*const ArcInner<Error> is !null: UnsafeUnpin,
PhantomData<ArcInner<Error>>: UnsafeUnpin,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ConditionalSend for Twhere
T: Send,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<A, B> Interchangeable<A> for B
impl<A, B> Interchangeable<A> for B
fn interchangeable_into(self) -> A
fn interchangeable_from(other: A) -> B
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§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<T> Template for T
impl<T> Template for T
§fn build_template(
&self,
_context: &mut TemplateContext<'_, '_>,
) -> Result<<T as Template>::Output, BevyError>
fn build_template( &self, _context: &mut TemplateContext<'_, '_>, ) -> Result<<T as Template>::Output, BevyError>
entity context to produce a [Template::Output].§fn clone_template(&self) -> T
fn clone_template(&self) -> T
Clone.§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string()] Read more§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString]. Read more§impl<T> TypeData for T
impl<T> TypeData for T
§fn clone_type_data(&self) -> Box<dyn TypeData>
fn clone_type_data(&self) -> Box<dyn TypeData>
self.