pub(crate) struct AddrWithStr<A>{
string: String,
addr: A,
}
Expand description
Represent an address type along with the string it was decoded from.
We use this type in connect points because, for some kinds of authentication, we need the literal input string that created the address.
Fields§
§string: String
The string representation of the address.
For inet addresses, this is the value that appeared in the configuration. For unix domain sockets, this is the value that appeared in the configuration, after shell expansion.
addr: A
The address itself.
Implementations§
Source§impl<A> AddrWithStr<A>
impl<A> AddrWithStr<A>
Source§impl AddrWithStr<CfgAddr>
impl AddrWithStr<CfgAddr>
Sourcepub(crate) fn resolve(
&self,
resolver: &CfgPathResolver,
) -> Result<AddrWithStr<SocketAddr>, ResolveError>
pub(crate) fn resolve( &self, resolver: &CfgPathResolver, ) -> Result<AddrWithStr<SocketAddr>, ResolveError>
Convert an AddrWithStr<CfgAddr>
into its substituted form.
Trait Implementations§
Source§impl<A> AsRef<A> for AddrWithStr<A>
impl<A> AsRef<A> for AddrWithStr<A>
Source§impl<A> Clone for AddrWithStr<A>
impl<A> Clone for AddrWithStr<A>
Source§fn clone(&self) -> AddrWithStr<A>
fn clone(&self) -> AddrWithStr<A>
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<A> Debug for AddrWithStr<A>
impl<A> Debug for AddrWithStr<A>
Source§impl<'de, A> Deserialize<'de> for AddrWithStr<A>
impl<'de, A> Deserialize<'de> for AddrWithStr<A>
Source§fn deserialize<__D>(deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl<A> Freeze for AddrWithStr<A>where
A: Freeze,
impl<A> RefUnwindSafe for AddrWithStr<A>where
A: RefUnwindSafe,
impl<A> Send for AddrWithStr<A>where
A: Send,
impl<A> Sync for AddrWithStr<A>where
A: Sync,
impl<A> Unpin for AddrWithStr<A>where
A: Unpin,
impl<A> UnwindSafe for AddrWithStr<A>where
A: UnwindSafe,
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,
§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