pub struct QuotaViolationError { /* private fields */ }Expand description
Thrown when a sensor records a value that causes a metric to go outside the bounds configured as its quota
§Translation notes
No protocol code; keeps only the metric name.
Implementations§
Source§impl QuotaViolationError
impl QuotaViolationError
Sourcepub fn new(metric_name: MetricName, value: f64, bound: f64) -> Self
pub fn new(metric_name: MetricName, value: f64, bound: f64) -> Self
Creates the error.
§Arguments
metric_name- the name of the metric that violated its quotavalue- the value that was recordedbound- the quota bound that was crossed
Sourcepub fn metric_name(&self) -> &MetricName
pub fn metric_name(&self) -> &MetricName
Returns the name of the metric that violated its quota.
Trait Implementations§
Source§impl Clone for QuotaViolationError
impl Clone for QuotaViolationError
Source§fn clone(&self) -> QuotaViolationError
fn clone(&self) -> QuotaViolationError
Returns a duplicate of the value. Read more
1.0.0 · 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 QuotaViolationError
impl Debug for QuotaViolationError
Source§impl Display for QuotaViolationError
impl Display for QuotaViolationError
Source§impl Error for QuotaViolationError
impl Error for QuotaViolationError
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()
Auto Trait Implementations§
impl Freeze for QuotaViolationError
impl RefUnwindSafe for QuotaViolationError
impl Send for QuotaViolationError
impl Sync for QuotaViolationError
impl Unpin for QuotaViolationError
impl UnsafeUnpin for QuotaViolationError
impl UnwindSafe for QuotaViolationError
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