#[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,
}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
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
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.
Trait Implementations§
Source§impl Clone for ControlChartError
impl Clone for ControlChartError
Source§fn clone(&self) -> ControlChartError
fn clone(&self) -> ControlChartError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ControlChartError
impl Debug for ControlChartError
Source§impl Display for ControlChartError
impl Display for ControlChartError
impl Eq 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)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for ControlChartError
impl PartialEq for ControlChartError
impl StructuralPartialEq for ControlChartError
Auto Trait Implementations§
impl Freeze for ControlChartError
impl RefUnwindSafe for ControlChartError
impl Send for ControlChartError
impl Sync for ControlChartError
impl Unpin for ControlChartError
impl UnsafeUnpin for ControlChartError
impl UnwindSafe for ControlChartError
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