pub enum CapabilityGrammarError {
Empty,
TooLong,
DoubleStar,
EmptySegment,
InvalidCharacter {
segment: String,
bad: char,
},
PartialStar {
segment: String,
},
}Expand description
Errors raised by validate_capability.
Variants§
Empty
Capability string is empty.
TooLong
Capability string exceeds MAX_CAPABILITY_LEN bytes.
DoubleStar
Capability contains the double-glob sequence ** (reserved).
EmptySegment
A segment between : separators is empty (leading, trailing,
or consecutive colons).
InvalidCharacter
A segment contains a character outside the allowed grammar.
PartialStar
A segment mixes * with other characters (e.g. foo*).
Trait Implementations§
Source§impl Debug for CapabilityGrammarError
impl Debug for CapabilityGrammarError
Source§impl Display for CapabilityGrammarError
impl Display for CapabilityGrammarError
impl Eq for CapabilityGrammarError
Source§impl Error for CapabilityGrammarError
impl Error for CapabilityGrammarError
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 CapabilityGrammarError
impl PartialEq for CapabilityGrammarError
Source§fn eq(&self, other: &CapabilityGrammarError) -> bool
fn eq(&self, other: &CapabilityGrammarError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CapabilityGrammarError
Auto Trait Implementations§
impl Freeze for CapabilityGrammarError
impl RefUnwindSafe for CapabilityGrammarError
impl Send for CapabilityGrammarError
impl Sync for CapabilityGrammarError
impl Unpin for CapabilityGrammarError
impl UnsafeUnpin for CapabilityGrammarError
impl UnwindSafe for CapabilityGrammarError
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<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.