scopeguard

Trait Strategy

Source
pub trait Strategy {
    // Required method
    fn should_run() -> bool;
}
Expand description

Controls in which cases the associated code should be run

Required Methods§

Source

fn should_run() -> bool

Return true if the guard’s associated code should run (in the context where this method is called).

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§