Enum cedar_policy_core::est::EstToAstError
source · pub enum EstToAstError {
JsonDeserializationError(JsonDeserializationError),
TemplateToPolicy(ContainsSlot),
InvalidSlotName,
ActionSlot,
MissingOperator,
MultipleOperators {
ops: Vec<SmolStr>,
},
MultiplicationByNonConstant {
arg1: Expr,
arg2: Expr,
},
UnescapeError(Vec<UnescapeError>),
}
Expand description
Errors arising while converting EST to AST
Variants§
JsonDeserializationError(JsonDeserializationError)
Error while deserializing JSON
TemplateToPolicy(ContainsSlot)
Tried to convert an EST representing a template to an AST representing a policy
InvalidSlotName
Slot name was not valid for the position it was used in. (Currently, principal slots must
be named ?principal
, and resource slots must be named ?resource
.)
ActionSlot
EST contained a template slot for action
. This is not currently allowed
MissingOperator
EST contained the empty JSON object {}
where a key (operator) was expected
MultipleOperators
EST contained an object with multiple keys (operators) where a single operator was expected
MultiplicationByNonConstant
At most one of the operands in a * b * c * d * ...
can be a non-{constant int}
UnescapeError(Vec<UnescapeError>)
Error thrown while processing string escapes
Trait Implementations§
source§impl Debug for EstToAstError
impl Debug for EstToAstError
source§impl Display for EstToAstError
impl Display for EstToAstError
source§impl Error for EstToAstError
impl Error for EstToAstError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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<ContainsSlot> for EstToAstError
impl From<ContainsSlot> for EstToAstError
source§fn from(source: ContainsSlot) -> Self
fn from(source: ContainsSlot) -> Self
Converts to this type from the input type.
source§impl From<JsonDeserializationError> for EstToAstError
impl From<JsonDeserializationError> for EstToAstError
source§fn from(source: JsonDeserializationError) -> Self
fn from(source: JsonDeserializationError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for EstToAstError
impl Send for EstToAstError
impl Sync for EstToAstError
impl Unpin for EstToAstError
impl !UnwindSafe for EstToAstError
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