pub struct ServerControlHook { /* private fields */ }Expand description
Represents the hooks for managing the server’s lifecycle, specifically for waiting and shutting down.
Implementations§
Source§impl ServerControlHook
Implementation of methods for ServerControlHook.
impl ServerControlHook
Implementation of methods for ServerControlHook.
Sourcepub fn get_wait_hook(
&self,
) -> Arc<dyn Fn() -> SendableAsyncTask<()> + Send + Sync>
pub fn get_wait_hook( &self, ) -> Arc<dyn Fn() -> SendableAsyncTask<()> + Send + Sync>
Sourcepub fn get_shutdown_hook(
&self,
) -> Arc<dyn Fn() -> SendableAsyncTask<()> + Send + Sync>
pub fn get_shutdown_hook( &self, ) -> Arc<dyn Fn() -> SendableAsyncTask<()> + Send + Sync>
Gets the shutdown hook.
§Returns
Arc<dyn Fn() -> SendableAsyncTask<()> + Send + Sync>- The shutdown hook.
Trait Implementations§
Source§impl Clone for ServerControlHook
impl Clone for ServerControlHook
Source§fn clone(&self) -> ServerControlHook
fn clone(&self) -> ServerControlHook
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for ServerControlHook
impl !RefUnwindSafe for ServerControlHook
impl Send for ServerControlHook
impl Sync for ServerControlHook
impl Unpin for ServerControlHook
impl !UnwindSafe for ServerControlHook
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