Struct trillium_server_common::ServerHandle 
source · 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
§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 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