pub struct Finding {
pub code: &'static str,
pub check: &'static str,
pub severity: Severity,
pub basis: Basis,
pub confidence: Confidence,
pub observation: String,
pub why_it_matters: String,
pub suggested_next_check: String,
pub variables: Vec<String>,
pub constraints: Vec<String>,
pub evidence: Value,
}Expand description
One finding. Build with Finding::new and the chained setters.
Fields§
§code: &'static strStable identifier, snake_case. Codes are part of the schema:
renaming one is a breaking change for anyone filtering on it.
check: &'static strThe check that produced it (one of Report::checks).
severity: Severity§basis: Basis§confidence: Confidence§observation: StringWhat was seen, in one or two sentences, naming the entities.
why_it_matters: StringWhy the solver or the user should care.
suggested_next_check: StringThe cheapest next thing to look at. An investigation step, never an instruction to change the model.
variables: Vec<String>Variable names involved.
constraints: Vec<String>Constraint names involved (objective for the objective).
evidence: ValueSupporting numbers: intervals, values, tolerances, the point label.
Implementations§
Source§impl Finding
impl Finding
pub fn new( check: &'static str, code: &'static str, severity: Severity, basis: Basis, confidence: Confidence, observation: impl Into<String>, ) -> Self
pub fn why(self, s: impl Into<String>) -> Self
pub fn next(self, s: impl Into<String>) -> Self
pub fn vars(self, v: Vec<String>) -> Self
pub fn cons(self, c: Vec<String>) -> Self
pub fn evidence(self, e: Value) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Forget for Finding
impl Freeze for Finding
impl Move for Finding
impl RefUnwindSafe for Finding
impl Send for Finding
impl Sync for Finding
impl Unpin for Finding
impl UnsafeUnpin for Finding
impl UnwindSafe for Finding
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T, U> Imply<T> for U
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more