pub struct UnixSignalHandler;Expand description
Unix signal handler implementation
Handles SIGTERM, SIGINT, and SIGHUP using tokio::signal.
Implementations§
Trait Implementations§
Source§impl Default for UnixSignalHandler
Available on Unix only.
impl Default for UnixSignalHandler
Available on Unix only.
Source§impl SystemSignals for UnixSignalHandler
Available on Unix only.
impl SystemSignals for UnixSignalHandler
Available on Unix only.
Source§fn wait_for_signal(
&self,
on_shutdown: ShutdownCallback,
) -> Pin<Box<dyn Future<Output = ()> + Send + '_>>
fn wait_for_signal( &self, on_shutdown: ShutdownCallback, ) -> Pin<Box<dyn Future<Output = ()> + Send + '_>>
Wait for a shutdown signal and invoke the callback Read more
Auto Trait Implementations§
impl Freeze for UnixSignalHandler
impl RefUnwindSafe for UnixSignalHandler
impl Send for UnixSignalHandler
impl Sync for UnixSignalHandler
impl Unpin for UnixSignalHandler
impl UnwindSafe for UnixSignalHandler
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