pub enum DomainClassification {
Domain(Name, Option<u16>),
Literal(HostOrSocketAddress),
}Expand description
Helper to reason about a domain name string. It can either be name that needs to be resolved, or some kind of IP literal. We also allow for an optional port number to be present in the domain name string.
Variants§
Domain(Name, Option<u16>)
A DNS Name pending resolution, plus an optional port number
Literal(HostOrSocketAddress)
A literal IP address (no port), or socket address (with port)
Implementations§
Auto Trait Implementations§
impl Freeze for DomainClassification
impl RefUnwindSafe for DomainClassification
impl Send for DomainClassification
impl Sync for DomainClassification
impl Unpin for DomainClassification
impl UnwindSafe for DomainClassification
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<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<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 more