pub enum Error {
RoleAlreadyExists(String),
RoleNotFound(String),
SubjectNotFound(String),
PermissionDenied(String),
CircularDependency(String),
InvalidPermission(String),
InvalidResource(String),
ElevationExpired(String),
MaxDepthExceeded(usize),
Storage(String),
InvalidConfiguration(String),
}Expand description
The main error type for role system operations.
Variants§
RoleAlreadyExists(String)
Role with the given name already exists.
RoleNotFound(String)
Role with the given name was not found.
SubjectNotFound(String)
Subject with the given ID was not found.
PermissionDenied(String)
Permission was denied for the requested operation.
CircularDependency(String)
Circular dependency detected in role hierarchy.
InvalidPermission(String)
Invalid permission format.
InvalidResource(String)
Invalid resource format.
ElevationExpired(String)
Role elevation has expired.
MaxDepthExceeded(usize)
Maximum role hierarchy depth exceeded.
Storage(String)
Storage operation failed.
InvalidConfiguration(String)
Invalid configuration.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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()
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
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