pub struct ShutdownCoordinator { /* private fields */ }Expand description
Coordinates the shutdown of multiple components.
Implementations§
Source§impl ShutdownCoordinator
impl ShutdownCoordinator
Sourcepub fn register(&self) -> ShutdownSignal
pub fn register(&self) -> ShutdownSignal
Register a new component to be managed by this coordinator.
Returns a ShutdownSignal that the component should hold and listen to.
Sourcepub fn broadcast(&self, reason: ShutdownReason)
pub fn broadcast(&self, reason: ShutdownReason)
Broadcast a shutdown signal to all registered components.
Trait Implementations§
Source§impl Debug for ShutdownCoordinator
impl Debug for ShutdownCoordinator
Auto Trait Implementations§
impl Freeze for ShutdownCoordinator
impl !RefUnwindSafe for ShutdownCoordinator
impl Send for ShutdownCoordinator
impl Sync for ShutdownCoordinator
impl Unpin for ShutdownCoordinator
impl UnsafeUnpin for ShutdownCoordinator
impl !UnwindSafe for ShutdownCoordinator
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