pub enum Expr {
ExprNoExt(ExprNoExt),
ExtFuncCall(ExtFuncCall),
}
Expand description
Serde JSON structure for a Cedar expression in the EST format
Variants§
ExprNoExt(ExprNoExt)
Any Cedar expression other than an extension function call.
ExtFuncCall(ExtFuncCall)
Extension function call, where the key is the name of an extension function or method.
Implementations§
Source§impl Expr
impl Expr
Sourcepub fn into_string_literal(self) -> Result<SmolStr, Self>
pub fn into_string_literal(self) -> Result<SmolStr, Self>
Consume the Expr
, producing a string literal if it was a string literal, otherwise returns the literal in the Err
variant.
Sourcepub fn sub_entity_literals(
self,
mapping: &BTreeMap<EntityUID, EntityUID>,
) -> Result<Self, JsonDeserializationError>
pub fn sub_entity_literals( self, mapping: &BTreeMap<EntityUID, EntityUID>, ) -> Result<Self, JsonDeserializationError>
Substitute entity literals
Source§impl Expr
impl Expr
Sourcepub fn try_into_ast(self, id: PolicyID) -> Result<Expr, FromJsonError>
pub fn try_into_ast(self, id: PolicyID) -> Result<Expr, FromJsonError>
Attempt to convert this est::Expr
into an ast::Expr
id
: the ID of the policy this Expr
belongs to, used only for reporting errors
Trait Implementations§
Source§impl BoundedDisplay for Expr
impl BoundedDisplay for Expr
Source§impl<'de> Deserialize<'de> for Expr
impl<'de> Deserialize<'de> for Expr
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Expr
Auto Trait Implementations§
impl Freeze for Expr
impl RefUnwindSafe for Expr
impl Send for Expr
impl Sync for Expr
impl Unpin for Expr
impl UnwindSafe for Expr
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> BoundedToString for Twhere
T: BoundedDisplay,
impl<T> BoundedToString for Twhere
T: BoundedDisplay,
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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