#[non_exhaustive]pub enum ControlChartError {
SampleLengthMismatch {
expected: usize,
got: usize,
},
NonFiniteValue,
DefectivesExceedSampleSize {
defectives: u64,
sample_size: u64,
},
NonPositiveUnits,
SubgroupSizeOutOfRange {
got: usize,
min: usize,
max: usize,
},
ZeroSampleSize,
InvalidStandard {
parameter: &'static str,
requirement: &'static str,
got: f64,
min: Option<f64>,
exclusive_min: Option<f64>,
max: Option<f64>,
exclusive_max: Option<f64>,
},
}Expand description
Errors returned when a control chart cannot be constructed or cannot take a sample.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
SampleLengthMismatch
A sample is not the length the chart takes: a subgroup of another size, or more than one value for an individuals chart.
NonFiniteValue
A sample holds a NaN or an infinity.
DefectivesExceedSampleSize
A sample reports more defectives than it has items.
NonPositiveUnits
Units inspected that is not a positive, finite number.
SubgroupSizeOutOfRange
The requested subgroup size is outside the range the factor tables cover.
Carries the rejected size so a caller can report it without re-deriving it, and so a boundary that cannot unwind – a WebAssembly or C entry point – can turn it into a value rather than a panic.
Fields
ZeroSampleSize
A sample size of zero: there is nothing to take a proportion of.
InvalidStandard
A known (Phase I) parameter outside its domain: p_bar in (0, 1),
u_bar > 0, phi >= 0, each finite.
Carries the value given and the domain, so a caller can say what the parameter has to be without restating the rule.
Fields
Trait Implementations§
Source§impl Clone for ControlChartError
impl Clone for ControlChartError
Source§impl Debug for ControlChartError
impl Debug for ControlChartError
Source§impl Display for ControlChartError
impl Display for ControlChartError
Source§impl Error for ControlChartError
impl Error for ControlChartError
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()