Interrupt

Trait Interrupt 

Source
pub trait Interrupt: Sync {
    // 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§