Trait terminate::Terminate [−][src]
Abstracts the need to terminate a loop or application and to begin and check termination.
Required methods
fn begin_termination(&self)
[src]
Begin termination.
fn begin_termination_due_to_irrecoverable_error(
&self,
irrecoverable_error: &(dyn Any + Send),
location: Option<&Location<'_>>
)
[src]
&self,
irrecoverable_error: &(dyn Any + Send),
location: Option<&Location<'_>>
)
Begin termination (due to an irrecoverable error).
Can be called more than once, but should only be called once per thread.
irrecoverable_error
is the same type as PanicInfo.payload
.
location
can be None
.
fn should_finish(&self) -> bool
[src]
Should finish.
fn terminated_due_to_panic_or_irrecoverable_error(&self) -> bool
[src]
Check after termination.
Provided methods
fn begin_termination_due_to_panic(&self, panic_info: &PanicInfo<'_>)
[src]
Begin termination (due to a panic).
Can be called more than once, but should only be called once per thread.
fn should_continue(&self) -> bool
[src]
Should continue (opposite of should_finish()
).
Implementors
impl<PPEL: ParsedPanicErrorLogger> Terminate for SimpleTerminate<PPEL>
[src]
fn begin_termination(&self)
[src]
Begin termination.
fn begin_termination_due_to_irrecoverable_error(
&self,
panic_payload: &(dyn Any + Send),
location: Option<&Location<'_>>
)
[src]
&self,
panic_payload: &(dyn Any + Send),
location: Option<&Location<'_>>
)