#[non_exhaustive]pub enum HistogramError {
InvalidSchema(i8),
InvalidCount {
what: &'static str,
value: f64,
},
CountNotExact {
what: &'static str,
value: f64,
},
UnorderedBuckets {
side: &'static str,
index: i32,
},
InvalidZeroThreshold(f64),
CustomValues(&'static str),
CountMismatch {
observed: f64,
declared: f64,
},
}Expand description
Everything that can be wrong with a histogram.
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.
InvalidSchema(i8)
The schema is outside -4 ..= 8 and is not CUSTOM_BUCKETS_SCHEMA.
InvalidCount
A count was negative, or not finite.
Fields
CountNotExact
A count exceeded what f64 represents exactly.
UnorderedBuckets
Buckets were not sorted, or an index appeared twice.
InvalidZeroThreshold(f64)
zero_threshold was negative or not finite.
CustomValues(&'static str)
Custom boundaries were supplied for an exponential schema, or omitted
for CUSTOM_BUCKETS_SCHEMA.
CountMismatch
The bucket counts add up to more than count.
Trait Implementations§
Source§impl Clone for HistogramError
impl Clone for HistogramError
Source§fn clone(&self) -> HistogramError
fn clone(&self) -> HistogramError
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 HistogramError
impl Debug for HistogramError
Source§impl Display for HistogramError
impl Display for HistogramError
Source§impl Error for HistogramError
impl Error for HistogramError
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 HistogramError
impl PartialEq for HistogramError
impl StructuralPartialEq for HistogramError
Auto Trait Implementations§
impl Freeze for HistogramError
impl RefUnwindSafe for HistogramError
impl Send for HistogramError
impl Sync for HistogramError
impl Unpin for HistogramError
impl UnsafeUnpin for HistogramError
impl UnwindSafe for HistogramError
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