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. This type deliberately stays
out of message policy and only carries the rejected input, so the
wrapper layer can format the user-facing message however it wants.
A front end parsing a user’s metric selection wants
crate::metric_catalog::resolve_selector instead, which takes
the wider CLI vocabulary and whose error carries a did-you-mean
hint.
Implementations§
Trait Implementations§
Source§impl Clone for ParseMetricError
impl Clone for ParseMetricError
Source§impl Debug for ParseMetricError
impl Debug for ParseMetricError
Source§impl Display for ParseMetricError
impl Display for ParseMetricError
impl Eq 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
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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§impl<T> ErrorExt for T
impl<T> ErrorExt for T
Source§fn raise_typed(self) -> Exn<Self>where
Self: Sized,
fn raise_typed(self) -> Exn<Self>where
Self: Sized,
Raise this error as a typed exception, retaining
Self even when it is already an Error.Source§fn and_raise_typed<T>(self, context: T) -> Exn<T>
fn and_raise_typed<T>(self, context: T) -> Exn<T>
Like
Self::and_raise(), retaining the context’s type in an exception.Source§fn raise_erased(self) -> Exnwhere
Self: Sized,
fn raise_erased(self) -> Exnwhere
Self: Sized,
Raise this error as a new exception, with type erasure.
Tree-backed
crate::Error values reuse their existing frame and caller location.