#[non_exhaustive]pub struct ListenerInfo {
pub id: ListenerId,
pub name: Option<String>,
pub local: Endpoint,
pub backlog: Option<u32>,
pub transport: Transport,
pub proxy: ProxyMode,
pub tls: bool,
}Expand description
Facts about one bound listener.
let listener = net_io::listen("127.0.0.1:0")?;
assert!(listener.info().local.socket_addr().is_some());Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: ListenerIdThe listener’s index in its server (0 for a plain listener).
name: Option<String>Its name, if one was given.
local: EndpointThe bound address.
backlog: Option<u32>The effective backlog; None when it cannot be read (macOS, adopted sockets).
transport: TransportThe kind of socket.
proxy: ProxyModeWhether it expects a PROXY header.
tls: boolWhether it serves TLS.
Trait Implementations§
Source§impl Clone for ListenerInfo
impl Clone for ListenerInfo
Auto Trait Implementations§
impl Freeze for ListenerInfo
impl RefUnwindSafe for ListenerInfo
impl Send for ListenerInfo
impl Sync for ListenerInfo
impl Unpin for ListenerInfo
impl UnsafeUnpin for ListenerInfo
impl UnwindSafe for ListenerInfo
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