Skip to main content

Report

Trait Report 

Source
pub trait Report {
    // Required method
    fn fail(&mut self, path: &'static str, at: &[u32], reason: Reason);
}
Expand description

Where a check sends each failure.

path names the field: <Model>.<field>, a nested model’s field after it (Value.climate.temp_c), [] for each list item, filled from at in order (Value.readings[] with at [1] is Value.readings[1]).

A model that reaches itself marks its steps in path as (<step>)*: Value(.next)*.n; with several, (.left|.right)*. In at the mark takes its repeat count, then per repeat the index of the step taken (only with several steps) and the indices of the [] inside it. The [] before the mark come first in at, those after it last. Value(.next)*.n with at [2] is Value.next.next.n. Value.root(.children[])*.leaf[] with at [2, 4, 1, 7] is Value.root.children[4].children[1].leaf[7]. Value(.left|.right)*.n with at [2, 0, 1] is Value.left.right.n. A count of 0 drops the step.

Required Methods§

Source

fn fail(&mut self, path: &'static str, at: &[u32], reason: Reason)

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl Report for Holds

Source§

impl Report for Under

Source§

impl<const N: usize> Report for Failures<N>