Skip to main content

Strategy

Trait Strategy 

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

Decides whether a deferred action runs when its guard is dropped.

Required Methods§

Source

fn should_run() -> bool

Returns true when the action should run in the current drop context.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl Strategy for Always

Source§

impl Strategy for OnSuccess

Available on crate feature std only.
Source§

impl Strategy for OnUnwind

Available on crate feature std only.