pub enum PolicyError {
Io(Error),
Yaml {
path: PathBuf,
source: Error,
},
MissingMode(String),
MissingApprovalProfile(String),
CapabilityNotAllowed(Capability),
ApprovalRequired(Capability),
CapabilityDenied(Capability),
}Expand description
Errors produced while loading or enforcing policy.
Variants§
Io(Error)
Filesystem access failed.
Yaml
YAML parsing failed.
MissingMode(String)
The requested mode was not present.
MissingApprovalProfile(String)
The requested approval profile was not present.
CapabilityNotAllowed(Capability)
The capability is not allowed in the current mode.
ApprovalRequired(Capability)
The capability requires explicit approval.
CapabilityDenied(Capability)
The capability is denied outright.
Trait Implementations§
Source§impl Debug for PolicyError
impl Debug for PolicyError
Source§impl Display for PolicyError
impl Display for PolicyError
Source§impl Error for PolicyError
impl Error for PolicyError
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 PolicyError
impl !RefUnwindSafe for PolicyError
impl Send for PolicyError
impl Sync for PolicyError
impl Unpin for PolicyError
impl UnsafeUnpin for PolicyError
impl !UnwindSafe for PolicyError
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