#[non_exhaustive]pub enum SelectorError {
Empty,
EmptyFold,
BadRegex(String),
BadGlob(String),
}Expand description
Error type returned from ProcessSelector::parse
#[non_exhaustive]: only two of today’s four selector kinds have a
failure mode of their own (fold: with no name, /regex/ that will not
compile) — a future kind with its own malformed-value class, such as a
status: filter rejecting a name that is not a known state, would need a
new variant rather than stretching Self::BadRegex to mean something
it does not, and shep-core is a published library an out-of-tree matcher
should not break for (IR-20).
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.
Empty
The selector string was empty
EmptyFold
fold: with no fold name after the colon
BadRegex(String)
The /regex/ body failed to compile (carries the regex message)
BadGlob(String)
A glob pattern was rejected by globset (carries its message)
Trait Implementations§
Source§impl Clone for SelectorError
impl Clone for SelectorError
Source§fn clone(&self) -> SelectorError
fn clone(&self) -> SelectorError
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 SelectorError
impl Debug for SelectorError
Source§impl Display for SelectorError
impl Display for SelectorError
impl Eq for SelectorError
Source§impl Error for SelectorError
impl Error for SelectorError
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 SelectorError
impl PartialEq for SelectorError
impl StructuralPartialEq for SelectorError
Auto Trait Implementations§
impl Freeze for SelectorError
impl RefUnwindSafe for SelectorError
impl Send for SelectorError
impl Sync for SelectorError
impl Unpin for SelectorError
impl UnsafeUnpin for SelectorError
impl UnwindSafe for SelectorError
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.