Trait fend_core::Interrupt

source ·
pub trait Interrupt {
    // Required method
    fn should_interrupt(&self) -> bool;
}
Expand description

This trait controls fend’s interrupt functionality.

If the should_interrupt method returns true, fend will attempt to interrupt the current calculation and return Err(FendError::Interrupted).

This can be used to implement timeouts or user interrupts via e.g. Ctrl-C.

Required Methods§

source

fn should_interrupt(&self) -> bool

Returns true if the current calculation should be interrupted.

Implementors§