pub struct ShutdownHandle { /* private fields */ }
Expand description
A wrapper around a vector of ShutdownButton’s. Ensures they will be pressed on dropping the handle.
Implementations§
Source§impl ShutdownHandle
impl ShutdownHandle
Wraps a single shutdown button into a shutdown handle.
Adds another shutdown button to this handle. This button will then also be pressed, whenever the handle is shut down or dropped.
Sourcepub fn merge_with(&mut self, other: Self)
pub fn merge_with(&mut self, other: Self)
Combines the buttons of another handle into self.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ShutdownHandle
impl !RefUnwindSafe for ShutdownHandle
impl !Send for ShutdownHandle
impl !Sync for ShutdownHandle
impl Unpin for ShutdownHandle
impl !UnwindSafe for ShutdownHandle
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