pub struct ShutdownController { /* private fields */ }Implementations§
Source§impl ShutdownController
impl ShutdownController
pub fn new() -> Self
pub fn token(&self) -> &CancellationToken
pub fn spawn_signal_handler(self: Arc<Self>) -> Arc<Self>
pub fn initiate_shutdown(&self)
pub fn is_shutdown_initiated(&self) -> bool
pub async fn wait_for_shutdown(&self)
Trait Implementations§
Source§impl Clone for ShutdownController
impl Clone for ShutdownController
Source§fn clone(&self) -> ShutdownController
fn clone(&self) -> ShutdownController
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 ShutdownController
impl RefUnwindSafe for ShutdownController
impl Send for ShutdownController
impl Sync for ShutdownController
impl Unpin for ShutdownController
impl UnwindSafe for ShutdownController
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