pub enum ScopeParseError {
Show 14 variants
TooLong {
len: usize,
max: usize,
},
TooManyAtoms {
count: usize,
max: usize,
},
AtomTooLong(usize),
ForbiddenCharacter(char),
Empty,
UnknownKind(String),
MalformedNsid(String),
MalformedMime(String),
UnknownAction(String),
UnknownAttribute(String),
SeveralScopes(String),
UnknownTransition(String),
MissingValue(String),
MalformedQuery(String, String),
}Expand description
A failure parsing one scope atom or a whole scope string.
Variants§
TooLong
The scope string is longer than the bound it was read under:
MAX_SCOPE_BYTES for a request, MAX_GRANT_BYTES for a grant.
TooManyAtoms
The scope string names more scopes than the bound it was read under:
MAX_SCOPE_ATOMS for a request, MAX_GRANT_ATOMS for a grant.
AtomTooLong(usize)
An atom is longer than MAX_ATOM_BYTES.
ForbiddenCharacter(char)
An atom holds a character outside RFC 6749’s scope-token: printable
ASCII except " and \.
Empty
The atom was the empty string.
UnknownKind(String)
The kind: prefix is not one this grammar defines.
MalformedNsid(String)
The collection or method value is not a valid NSID or NSID wildcard.
MalformedMime(String)
The MIME value is not type/subtype, with either half a *.
UnknownAction(String)
An action= value the atom’s kind does not define.
UnknownAttribute(String)
An attr value the atom’s kind does not define.
SeveralScopes(String)
Scope::parse was given an atom that names
several scopes, one for each collection or method it lists.
UnknownTransition(String)
A transition: atom named something other than the three defined
legacy scopes.
MissingValue(String)
The atom gave no value for the parameter its kind requires, such as
repo:’s collection. An include: whose value names no permission
set still parses; see Include::new.
MalformedQuery(String, String)
A ?query segment had a pair with no =.
Trait Implementations§
Source§impl Clone for ScopeParseError
impl Clone for ScopeParseError
Source§fn clone(&self) -> ScopeParseError
fn clone(&self) -> ScopeParseError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ScopeParseError
impl Debug for ScopeParseError
Source§impl Display for ScopeParseError
impl Display for ScopeParseError
Source§impl Error for ScopeParseError
impl Error for ScopeParseError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl PartialEq for ScopeParseError
impl PartialEq for ScopeParseError
Source§fn eq(&self, other: &ScopeParseError) -> bool
fn eq(&self, other: &ScopeParseError) -> bool
self and other values to be equal, and is used by ==.impl Eq for ScopeParseError
impl StructuralPartialEq for ScopeParseError
Auto Trait Implementations§
impl Freeze for ScopeParseError
impl RefUnwindSafe for ScopeParseError
impl Send for ScopeParseError
impl Sync for ScopeParseError
impl Unpin for ScopeParseError
impl UnsafeUnpin for ScopeParseError
impl UnwindSafe for ScopeParseError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.