#[cfg(feature = "async-error")]
pub mod future;
pub mod thread;
pub trait CheckForPanics: Sized {
type Output;
#[track_caller]
fn panic_if_task_has_finished(self) -> Self::Output {
self.check_for_panics_with(true)
}
#[track_caller]
fn panic_if_task_has_panicked(self) -> Self::Output {
self.check_for_panics_with(false)
}
#[track_caller]
fn check_for_panics_with(self, panic_on_unexpected_termination: bool) -> Self::Output;
}
pub trait WaitForPanics: Sized {
type Output;
#[track_caller]
fn wait_and_panic_on_unexpected_termination(self) -> Self::Output {
self.wait_for_panics_with(true)
}
#[track_caller]
fn wait_for_panics(self) -> Self::Output {
self.wait_for_panics_with(false)
}
#[track_caller]
fn wait_for_panics_with(self, panic_on_unexpected_termination: bool) -> Self::Output;
}