pub struct UnknownSelectorError { /* private fields */ }Expand description
Error returned by resolve_selector for a name that is no metric
selector.
Carries the rejected input and the did-you-mean candidates, drawn
from selector_names. Display renders
unknown metric: <input>[; did you mean …]; known metrics: <names>,
the message the Python bindings raise; its exact wording is not
SemVer-protected. A front end that wants its own wording composes it
from input, suggestions and
selector_names.
Implementations§
Source§impl UnknownSelectorError
impl UnknownSelectorError
Sourcepub fn suggestions(&self) -> &[&'static str]
pub fn suggestions(&self) -> &[&'static str]
The selector_names closest to the input, best first; empty
when nothing is close. At most three, all tied on closeness.
Trait Implementations§
Source§impl Clone for UnknownSelectorError
impl Clone for UnknownSelectorError
Source§impl Debug for UnknownSelectorError
impl Debug for UnknownSelectorError
Source§impl Display for UnknownSelectorError
impl Display for UnknownSelectorError
impl Eq for UnknownSelectorError
Source§impl Error for UnknownSelectorError
impl Error for UnknownSelectorError
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 UnknownSelectorError
impl PartialEq for UnknownSelectorError
impl StructuralPartialEq for UnknownSelectorError
Auto Trait Implementations§
impl Freeze for UnknownSelectorError
impl RefUnwindSafe for UnknownSelectorError
impl Send for UnknownSelectorError
impl Sync for UnknownSelectorError
impl Unpin for UnknownSelectorError
impl UnsafeUnpin for UnknownSelectorError
impl UnwindSafe for UnknownSelectorError
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.