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<ResolvedVal> for ResolvedVal
impl PartialEq<ResolvedVal> 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 StructuralEq for ResolvedVal
impl StructuralPartialEq for ResolvedVal
Auto Trait Implementations§
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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§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> WithSubscriber for T
impl<T> WithSubscriber for T
source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,
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>where
B: Writer + ?Sized,
fn write_into<B>(self, b: &mut B) -> Result<(), EncodeError>where B: Writer + ?Sized,
Encode this object into the writer
b, and consume it.