Struct eiffelvis_http::Handle
[−]pub struct Handle { /* private fields */ }
Expand description
A handle for Server
.
Implementations
impl Handle
impl Handle
pub fn connection_count(&self) -> usize
pub fn connection_count(&self) -> usize
Get the number of connections.
pub fn shutdown(&self)
pub fn shutdown(&self)
Shutdown the server.
pub fn graceful_shutdown(&self, duration: Option<Duration>)
pub fn graceful_shutdown(&self, duration: Option<Duration>)
Gracefully shutdown the server.
None
means indefinite grace period.
pub async fn listening(&self) -> impl Future<Output = Option<SocketAddr>>
pub async fn listening(&self) -> impl Future<Output = Option<SocketAddr>>
Returns local address and port when server starts listening.
Returns None
if server fails to bind.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Handle
impl Send for Handle
impl Sync for Handle
impl Unpin for Handle
impl UnwindSafe for Handle
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more