pub struct ResponseSupportViolation {
pub family_label: &'static str,
pub requirement: &'static str,
pub offending: Vec<(usize, f64)>,
pub total_violations: usize,
}Expand description
Domain-violation detail produced by ResponseFamily::validate_response_support.
Owns its own Display impl so call sites in the workflow, the CLI, and the
external-design GLM path produce identical user-facing prose. The
total_violations counter is kept distinct from offending.len() so the
message can honestly say (N total) even when only the first
MAX_REPORTED indices are surfaced.
Fields§
§family_label: &'static str§requirement: &'static str§offending: Vec<(usize, f64)>§total_violations: usizeImplementations§
Source§impl ResponseSupportViolation
impl ResponseSupportViolation
Sourcepub const MAX_REPORTED: usize = 5
pub const MAX_REPORTED: usize = 5
Maximum number of offending row indices reported in the error message. Keeps the message bounded on large-scale data while still pointing the user at concrete bad rows to inspect.
Sourcepub fn message_for(&self, response_name: &str) -> String
pub fn message_for(&self, response_name: &str) -> String
Format the violation against a specific response column name. The
column name is supplied by the caller because ResponseFamily does
not know which column the user pointed at.
Trait Implementations§
Source§impl Clone for ResponseSupportViolation
impl Clone for ResponseSupportViolation
Source§fn clone(&self) -> ResponseSupportViolation
fn clone(&self) -> ResponseSupportViolation
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ResponseSupportViolation
impl Debug for ResponseSupportViolation
Source§impl Display for ResponseSupportViolation
impl Display for ResponseSupportViolation
Source§impl Error for ResponseSupportViolation
impl Error for ResponseSupportViolation
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for ResponseSupportViolation
impl RefUnwindSafe for ResponseSupportViolation
impl Send for ResponseSupportViolation
impl Sync for ResponseSupportViolation
impl Unpin for ResponseSupportViolation
impl UnsafeUnpin for ResponseSupportViolation
impl UnwindSafe for ResponseSupportViolation
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
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,
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T, U> Imply<T> for U
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>
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>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.