pub struct ServerHandle { /* private fields */ }
Expand description
A handle for a spawned trillium server. Returned by
Config::handle
and
Config::spawn
Implementations§
Source§impl ServerHandle
impl ServerHandle
Sourcepub fn observer(&self) -> CloneCounterObserver
pub fn observer(&self) -> CloneCounterObserver
retrieves a CloneCounterObserver
which can be used to
monitor or modify the number of outstanding connections for
the purposes of graceful shutdown.
Sourcepub fn is_running(&self) -> bool
pub fn is_running(&self) -> bool
checks whether this server has shut down. It’s preferable to await
this ServerHandle
instead of polling this.
Trait Implementations§
Source§impl Clone for ServerHandle
impl Clone for ServerHandle
Source§fn clone(&self) -> ServerHandle
fn clone(&self) -> ServerHandle
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ServerHandle
impl Debug for ServerHandle
Source§impl IntoFuture for ServerHandle
impl IntoFuture for ServerHandle
Source§type IntoFuture = CompletionFuture
type IntoFuture = CompletionFuture
Which kind of future are we turning this into?
Source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read more
Auto Trait Implementations§
impl Freeze for ServerHandle
impl RefUnwindSafe for ServerHandle
impl Send for ServerHandle
impl Sync for ServerHandle
impl Unpin for ServerHandle
impl UnwindSafe for ServerHandle
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