pub enum ScopeRegistryError {
InvalidRoleName(RoleNameError),
InvalidScope(ScopeError),
DuplicateRole(RoleName),
UnknownInheritedRole {
role: RoleName,
inherits: RoleName,
},
InheritanceCycle {
path: Vec<RoleName>,
},
InheritsBeforeRole,
}Expand description
Why ScopeRegistryBuilder::build rejected the declared taxonomy.
Variants§
InvalidRoleName(RoleNameError)
A role name (declared or referenced in inherits) failed the
[a-z][a-z0-9_]* grammar.
InvalidScope(ScopeError)
A granted scope failed the scope grammar.
DuplicateRole(RoleName)
The same role name was declared twice. Silent override in an auth taxonomy is a footgun; redeclaration is rejected explicitly.
UnknownInheritedRole
A role’s inherits references a role that was never declared.
Fields
InheritanceCycle
The inheritance graph contains a cycle. Carries the cycle path
(first element repeated at the end, e.g. [a, b, a]).
InheritsBeforeRole
ScopeRegistryBuilder::inherits (or description) was called
before any ScopeRegistryBuilder::role — there is no
most-recently-added role to modify.
Trait Implementations§
Source§impl Clone for ScopeRegistryError
impl Clone for ScopeRegistryError
Source§impl Debug for ScopeRegistryError
impl Debug for ScopeRegistryError
Source§impl Display for ScopeRegistryError
impl Display for ScopeRegistryError
impl Eq for ScopeRegistryError
Source§impl Error for ScopeRegistryError
impl Error for ScopeRegistryError
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 From<RoleNameError> for ScopeRegistryError
impl From<RoleNameError> for ScopeRegistryError
Source§fn from(e: RoleNameError) -> Self
fn from(e: RoleNameError) -> Self
Converts to this type from the input type.
Source§impl From<ScopeError> for ScopeRegistryError
impl From<ScopeError> for ScopeRegistryError
Source§fn from(e: ScopeError) -> Self
fn from(e: ScopeError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ScopeRegistryError
impl PartialEq for ScopeRegistryError
impl StructuralPartialEq for ScopeRegistryError
Auto Trait Implementations§
impl Forget for ScopeRegistryError
impl Freeze for ScopeRegistryError
impl RefUnwindSafe for ScopeRegistryError
impl Send for ScopeRegistryError
impl Sync for ScopeRegistryError
impl Unpin for ScopeRegistryError
impl UnsafeUnpin for ScopeRegistryError
impl UnwindSafe for ScopeRegistryError
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