pub struct ParseMetricError(/* private fields */);Expand description
Error returned by Metric::from_str when the input
is not a recognised metric name.
Holds the offending input verbatim. Downstream consumers that own
the canonical name table (e.g. the bca Python bindings’
METRIC_NAMES constant) typically compose this with a
valid: <list> suffix from their own source of truth; this type
deliberately stays out of that policy and only carries the
rejected input so the wrapper layer can format the user-facing
message however it wants.
Trait Implementations§
Source§impl Clone for ParseMetricError
impl Clone for ParseMetricError
Source§fn clone(&self) -> ParseMetricError
fn clone(&self) -> ParseMetricError
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 ParseMetricError
impl Debug for ParseMetricError
Source§impl Display for ParseMetricError
impl Display for ParseMetricError
Source§impl Error for ParseMetricError
impl Error for ParseMetricError
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 ParseMetricError
impl PartialEq for ParseMetricError
Source§fn eq(&self, other: &ParseMetricError) -> bool
fn eq(&self, other: &ParseMetricError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for ParseMetricError
impl StructuralPartialEq for ParseMetricError
Auto Trait Implementations§
impl Freeze for ParseMetricError
impl RefUnwindSafe for ParseMetricError
impl Send for ParseMetricError
impl Sync for ParseMetricError
impl Unpin for ParseMetricError
impl UnsafeUnpin for ParseMetricError
impl UnwindSafe for ParseMetricError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.