#[non_exhaustive]pub enum CapSecError {
OutOfScope {
target: String,
scope: String,
},
Io(Error),
Revoked,
Expired,
}Expand description
Errors that can occur when using capsec capabilities.
Most commonly seen when an Attenuated capability
rejects an operation that falls outside its scope.
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.
OutOfScope
The target of a capability operation is outside the granted scope.
For example, trying to read /etc/passwd with a DirScope restricted to /tmp.
Fields
Io(Error)
An I/O error from the underlying std operation.
Revoked
The capability was revoked via its associated Revoker.
Expired
The capability has expired (TTL elapsed).
Trait Implementations§
Source§impl Debug for CapSecError
impl Debug for CapSecError
Source§impl Display for CapSecError
impl Display for CapSecError
Source§impl Error for CapSecError
impl Error for CapSecError
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 CapSecError
impl !RefUnwindSafe for CapSecError
impl Send for CapSecError
impl Sync for CapSecError
impl Unpin for CapSecError
impl UnsafeUnpin for CapSecError
impl !UnwindSafe for CapSecError
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