pub enum PolicyError {
Io(Error),
Toml(Error),
ExprParse(String),
RequirementExpression {
name: String,
source: Box<PolicyError>,
},
UnknownRequirement {
name: String,
},
InvalidAliasEntry {
canonical: String,
entry: String,
},
}Expand description
Error returned by the policy parser and validator.
Variants§
Io(Error)
I/O error reading the policy file.
Toml(Error)
TOML parse error.
ExprParse(String)
A requirement expression failed to parse (bad token, trailing tokens, unbalanced parens, empty input, etc.).
RequirementExpression
A requirement’s condition expression failed to parse. Carries
the requirement name as context; the wrapped error is the
underlying ExprParse.
Fields
§
source: Box<PolicyError>The underlying parse error.
UnknownRequirement
An [[override]] block references a requirement name that
isn’t defined in [requirement].
InvalidAliasEntry
An [alias] entry isn’t in log:claim-name form (missing
the : separator).
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()
Source§impl From<Error> for PolicyError
impl From<Error> for PolicyError
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