Enum tor_cell::relaycell::msg::ResolvedVal
source · #[non_exhaustive]pub enum ResolvedVal {
Ip(IpAddr),
Hostname(Vec<u8>),
TransientError,
NontransientError,
Unrecognized(u8, Vec<u8>),
}
Expand description
Possible response to a DNS lookup
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Ip(IpAddr)
We found an IP address
Hostname(Vec<u8>)
We found a hostname
TransientError
Error; try again
NontransientError
Error; don’t try again
Unrecognized(u8, Vec<u8>)
A DNS lookup response that we didn’t recognize
Trait Implementations§
source§impl Clone for ResolvedVal
impl Clone for ResolvedVal
source§fn clone(&self) -> ResolvedVal
fn clone(&self) -> ResolvedVal
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ResolvedVal
impl Debug for ResolvedVal
source§impl PartialEq for ResolvedVal
impl PartialEq for ResolvedVal
source§fn eq(&self, other: &ResolvedVal) -> bool
fn eq(&self, other: &ResolvedVal) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Readable for ResolvedVal
impl Readable for ResolvedVal
source§impl Writeable for ResolvedVal
impl Writeable for ResolvedVal
source§fn write_onto<B: Writer + ?Sized>(&self, w: &mut B) -> EncodeResult<()>
fn write_onto<B: Writer + ?Sized>(&self, w: &mut B) -> EncodeResult<()>
Encode this object into the writer
b
.impl Eq for ResolvedVal
impl StructuralPartialEq for ResolvedVal
Auto Trait Implementations§
impl Freeze for ResolvedVal
impl RefUnwindSafe for ResolvedVal
impl Send for ResolvedVal
impl Sync for ResolvedVal
impl Unpin for ResolvedVal
impl UnwindSafe for ResolvedVal
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.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>
Converts
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>
Converts
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 moresource§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
source§impl<W> WriteableOnce for Wwhere
W: Writeable,
impl<W> WriteableOnce for Wwhere
W: Writeable,
source§fn write_into<B>(self, b: &mut B) -> Result<(), EncodeError>
fn write_into<B>(self, b: &mut B) -> Result<(), EncodeError>
Encode this object into the writer
b
, and consume it.