Skip to main content

RuntimeCheck

Trait RuntimeCheck 

Source
pub trait RuntimeCheck<S> {
    // Required methods
    fn name(&self) -> &str;
    fn execute(&self, state: &S) -> CheckResult;

    // Provided method
    fn priority(&self) -> u8 { ... }
}
Expand description

A runtime check that can be executed.

Required Methods§

Source

fn name(&self) -> &str

Name of the check.

Source

fn execute(&self, state: &S) -> CheckResult

Execute the check.

Provided Methods§

Source

fn priority(&self) -> u8

Priority (higher = more important).

Implementors§

Source§

impl<S, F> RuntimeCheck<S> for PostCondition<F>
where F: Fn(&S) -> bool,

Source§

impl<S, F> RuntimeCheck<S> for PreCondition<F>
where F: Fn(&S) -> bool,