pub struct ExitReceiver { /* private fields */ }
Expand description
Provides a way to run futures scheduled with an ExitHandler
.
Implementations§
Source§impl ExitReceiver
impl ExitReceiver
Sourcepub async fn run_exit_handler(self)
pub async fn run_exit_handler(self)
Call this when the process exits to run the futures scheduled via
ExitHandler::on_exit
.
As this is intended to be used in a library context, this does not exit the process. It is expected that the process will not exit until this async method finishes executing.
Additional work can be scheduled using ExitHandler::on_exit
even
while this is running, and it will execute before this function
finishes. Work attempted to be scheduled after this finishes will panic.
Auto Trait Implementations§
impl Freeze for ExitReceiver
impl RefUnwindSafe for ExitReceiver
impl Send for ExitReceiver
impl Sync for ExitReceiver
impl Unpin for ExitReceiver
impl UnwindSafe for ExitReceiver
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