pub struct ServerHandle { /* private fields */ }Expand description
Handle to a running server.
The server functions as long as this handle is not dropped.
Implementations§
Source§impl ServerHandle
impl ServerHandle
Sourcepub async fn shutdown(self)
pub async fn shutdown(self)
Signal to the server to close down. Stop listening to the port and exit.
Sourcepub async fn keep_alive(self) -> !
pub async fn keep_alive(self) -> !
Await this to keep the server alive forever. Will never return.
Trait Implementations§
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