pub struct ListenerHandle { /* private fields */ }Expand description
Handle to a running listener (SRV-001).
stop performs the graceful shutdown: the accept loop
ends, every connection finishes its in-flight requests, drains its
writer and closes; stop resolves when the last connection is gone.
Dropping the handle signals the same shutdown without waiting.
Implementations§
Source§impl ListenerHandle
impl ListenerHandle
Sourcepub fn local_addr(&self) -> SocketAddr
pub fn local_addr(&self) -> SocketAddr
The bound address (resolves port 0 binds).
Sourcepub fn snapshot(&self) -> MetricsSnapshot
pub fn snapshot(&self) -> MetricsSnapshot
Point-in-time metrics (SRV-030).
Trait Implementations§
Source§impl Debug for ListenerHandle
impl Debug for ListenerHandle
Source§impl Drop for ListenerHandle
impl Drop for ListenerHandle
Auto Trait Implementations§
impl Freeze for ListenerHandle
impl RefUnwindSafe for ListenerHandle
impl Send for ListenerHandle
impl Sync for ListenerHandle
impl Unpin for ListenerHandle
impl UnsafeUnpin for ListenerHandle
impl UnwindSafe for ListenerHandle
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