pub enum MetaTlsAddr {
Host {
hostname: Hostname,
port: Port,
},
Socket(SocketAddr),
}Expand description
Address format for MetaTls channels. Supports both hostname/port pairs (required for clients for host identity) and direct socket addresses (allowed for servers).
Variants§
Host
Hostname and port pair. Required for clients to establish host identity.
Socket(SocketAddr)
Direct socket address. Allowed for servers.
Implementations§
Source§impl MetaTlsAddr
impl MetaTlsAddr
Sourcepub fn as_host_mut(&mut self) -> Option<(&mut Hostname, &mut Port)>
pub fn as_host_mut(&mut self) -> Option<(&mut Hostname, &mut Port)>
Optionally returns mutable references to the inner fields if this is a MetaTlsAddr::Host, otherwise None
Sourcepub fn as_host(&self) -> Option<(&Hostname, &Port)>
pub fn as_host(&self) -> Option<(&Hostname, &Port)>
Optionally returns references to the inner fields if this is a MetaTlsAddr::Host, otherwise None
Sourcepub fn into_host(self) -> Result<(Hostname, Port), Self>
pub fn into_host(self) -> Result<(Hostname, Port), Self>
Returns the inner fields if this is a MetaTlsAddr::Host, otherwise returns back the enum in the Err case of the result
Sourcepub fn as_socket_mut(&mut self) -> Option<&mut SocketAddr>
pub fn as_socket_mut(&mut self) -> Option<&mut SocketAddr>
Optionally returns mutable references to the inner fields if this is a MetaTlsAddr::Socket, otherwise None
Sourcepub fn as_socket(&self) -> Option<&SocketAddr>
pub fn as_socket(&self) -> Option<&SocketAddr>
Optionally returns references to the inner fields if this is a MetaTlsAddr::Socket, otherwise None
Sourcepub fn into_socket(self) -> Result<SocketAddr, Self>
pub fn into_socket(self) -> Result<SocketAddr, Self>
Returns the inner fields if this is a MetaTlsAddr::Socket, otherwise returns back the enum in the Err case of the result
Trait Implementations§
Source§impl Clone for MetaTlsAddr
impl Clone for MetaTlsAddr
Source§fn clone(&self) -> MetaTlsAddr
fn clone(&self) -> MetaTlsAddr
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MetaTlsAddr
impl Debug for MetaTlsAddr
Source§impl<'de> Deserialize<'de> for MetaTlsAddr
impl<'de> Deserialize<'de> for MetaTlsAddr
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>,
Source§impl Display for MetaTlsAddr
impl Display for MetaTlsAddr
Source§impl Hash for MetaTlsAddr
impl Hash for MetaTlsAddr
Source§impl Ord for MetaTlsAddr
impl Ord for MetaTlsAddr
Source§fn cmp(&self, other: &MetaTlsAddr) -> Ordering
fn cmp(&self, other: &MetaTlsAddr) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for MetaTlsAddr
impl PartialEq for MetaTlsAddr
Source§impl PartialOrd for MetaTlsAddr
impl PartialOrd for MetaTlsAddr
Source§impl Serialize for MetaTlsAddr
impl Serialize for MetaTlsAddr
impl Eq for MetaTlsAddr
impl StructuralPartialEq for MetaTlsAddr
Auto Trait Implementations§
impl Freeze for MetaTlsAddr
impl RefUnwindSafe for MetaTlsAddr
impl Send for MetaTlsAddr
impl Sync for MetaTlsAddr
impl Unpin for MetaTlsAddr
impl UnwindSafe for MetaTlsAddr
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<A, M> Handler<IndexedErasedUnbound<M>> for A
impl<A, M> Handler<IndexedErasedUnbound<M>> for A
§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>
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>
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