#[non_exhaustive]pub enum ListenerKind {
Tcp(SocketAddr),
Quic(SocketAddr),
Unix(Option<PathBuf>),
Other(Cow<'static, str>),
}Expand description
What kind of network binding a Listener describes: a TCP or QUIC address, a
Unix-domain-socket path, or a string descriptor for a kind this enum does not name.
It is #[non_exhaustive]: matching must include a wildcard arm, and new variants may be added
in a minor release. An Other variant carries a human-readable
descriptor for listener kinds this enum does not (yet) name — a producer with a novel transport
describes it as a string rather than forcing a downcast no generic reader could use.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Tcp(SocketAddr)
A TCP listener bound to this address. An inherited listener (e.g. from systemfd/LISTEN_FD)
is reported as Tcp once adopted, since it is an ordinary TCP listener with a resolvable
local address.
Quic(SocketAddr)
A QUIC/UDP listener serving HTTP/3, bound to this address. Always TLS.
Unix(Option<PathBuf>)
A Unix-domain-socket listener. The path is None for an unnamed or abstract socket.
Other(Cow<'static, str>)
A listener kind this enum does not name, described for display purposes only.
Trait Implementations§
Source§impl Clone for ListenerKind
impl Clone for ListenerKind
Source§fn clone(&self) -> ListenerKind
fn clone(&self) -> ListenerKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ListenerKind
impl Debug for ListenerKind
Source§impl Display for ListenerKind
impl Display for ListenerKind
impl Eq for ListenerKind
Source§impl Hash for ListenerKind
impl Hash for ListenerKind
Source§impl PartialEq for ListenerKind
impl PartialEq for ListenerKind
Source§fn eq(&self, other: &ListenerKind) -> bool
fn eq(&self, other: &ListenerKind) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ListenerKind
Auto Trait Implementations§
impl Freeze for ListenerKind
impl RefUnwindSafe for ListenerKind
impl Send for ListenerKind
impl Sync for ListenerKind
impl Unpin for ListenerKind
impl UnsafeUnpin for ListenerKind
impl UnwindSafe for ListenerKind
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,
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
key and return true if they are equal.