pub enum Error {
Show 18 variants
ConnectionClosed,
OptTooLong,
MessageBuilderPushError,
MessageParseError,
RedundantTransportNotFound,
FormError,
ShortMessage,
StreamLongMessage,
StreamIdleTimeout,
StreamReceiveError,
StreamReadError(Arc<Error>),
StreamReadTimeout,
StreamTooManyOutstandingQueries,
StreamWriteError(Arc<Error>),
StreamUnexpectedEndOfData,
WrongReplyForQuery,
NoTransportAvailable,
Dgram(Arc<QueryError>),
}
Expand description
Error type for client transports.
Variants§
ConnectionClosed
Connection was already closed.
OptTooLong
The OPT record has become too long.
MessageBuilderPushError
PushError from MessageBuilder.
MessageParseError
ParseError from Message.
RedundantTransportNotFound
Underlying transport not found in redundant connection
FormError
The message violated some constraints.
ShortMessage
Octet sequence too short to be a valid DNS message.
StreamLongMessage
Message too long for stream transport.
StreamIdleTimeout
Stream transport closed because it was idle (for too long).
StreamReceiveError
Error receiving a reply.
StreamReadError(Arc<Error>)
Reading from stream gave an error.
StreamReadTimeout
Reading from stream took too long.
StreamTooManyOutstandingQueries
Too many outstand queries on a single stream transport.
StreamWriteError(Arc<Error>)
Writing to a stream gave an error.
StreamUnexpectedEndOfData
Reading for a stream ended unexpectedly.
WrongReplyForQuery
Reply does not match the query.
NoTransportAvailable
No transport available to transmit request.
Dgram(Arc<QueryError>)
An error happened in the datagram transport.
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)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl From<CopyRecordsError> for Error
impl From<CopyRecordsError> for Error
source§fn from(err: CopyRecordsError) -> Self
fn from(err: CopyRecordsError) -> Self
Converts to this type from the input type.
source§impl From<LongOptData> for Error
impl From<LongOptData> for Error
source§fn from(_: LongOptData) -> Self
fn from(_: LongOptData) -> Self
Converts to this type from the input type.
source§impl From<ParseError> for Error
impl From<ParseError> for Error
source§fn from(_: ParseError) -> Self
fn from(_: ParseError) -> Self
Converts to this type from the input type.
source§impl From<QueryError> for Error
impl From<QueryError> for Error
source§fn from(err: QueryError) -> Self
fn from(err: QueryError) -> Self
Converts to this type from the input type.
source§impl From<ShortMessage> for Error
impl From<ShortMessage> for Error
source§fn from(_: ShortMessage) -> Self
fn from(_: ShortMessage) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe 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
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
impl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
type Error = <Target as OctetsFrom<Source>>::Error
source§fn try_octets_into(
self,
) -> Result<Target, <Source as OctetsInto<Target>>::Error>
fn try_octets_into( self, ) -> Result<Target, <Source as OctetsInto<Target>>::Error>
Performs the conversion.
source§fn octets_into(self) -> Target
fn octets_into(self) -> Target
Performs an infallible conversion.