Skip to main content

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.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§