Skip to main content

AlgorithmInterrupt

Trait AlgorithmInterrupt 

Source
pub trait AlgorithmInterrupt {
    // Required method
    fn is_cancelled(&self) -> bool;

    // Provided method
    fn elapsed(&self) -> Duration { ... }
}
Expand description

Cooperative cancellation source for graph algorithms.

Required Methods§

Source

fn is_cancelled(&self) -> bool

Returns true when the active computation should stop.

Provided Methods§

Source

fn elapsed(&self) -> Duration

Elapsed monotonic time supplied by the caller’s model or platform.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§