Enum cedar_policy_core::est::EstToAstError
source · pub enum EstToAstError {
JsonDeserializationError(JsonDeserializationError),
TemplateToPolicy(UnexpectedSlotError),
InvalidSlotName,
ActionSlot,
SlotsInConditionClause {
slot: SlotId,
clausetype: &'static str,
},
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(UnexpectedSlotError)
Tried to convert an EST representing a template to an AST representing a static 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
SlotsInConditionClause
EST contained a template slot in policy condition
Fields
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)>
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<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.
source§impl From<UnexpectedSlotError> for EstToAstError
impl From<UnexpectedSlotError> for EstToAstError
source§fn from(source: UnexpectedSlotError) -> Self
fn from(source: UnexpectedSlotError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for EstToAstError
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
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more