Enum cedar_policy_core::est::Clause
source · pub enum Clause {
When(Expr),
Unless(Expr),
}
Expand description
Serde JSON structure for a when
or unless
clause in the EST format
Variants§
Implementations§
source§impl Clause
impl Clause
sourcepub fn instantiate(
self,
_vals: &HashMap<SlotId, EntityUidJSON>
) -> Result<Self, InstantiationError>
pub fn instantiate( self, _vals: &HashMap<SlotId, EntityUidJSON> ) -> Result<Self, InstantiationError>
Fill in any slots in the clause using the values in vals
. Throws an
error if vals
doesn’t contain a necessary mapping, but does not throw
an error if vals
contains unused mappings.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Clause
impl<'de> Deserialize<'de> for Clause
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
source§impl PartialEq<Clause> for Clause
impl PartialEq<Clause> for Clause
source§impl TryFrom<Clause> for Expr
impl TryFrom<Clause> for Expr
§type Error = EstToAstError
type Error = EstToAstError
The type returned in the event of a conversion error.
source§impl TryFrom<Cond> for Clause
impl TryFrom<Cond> for Clause
§type Error = ParseErrors
type Error = ParseErrors
The type returned in the event of a conversion error.
impl StructuralPartialEq for Clause
Auto Trait Implementations§
impl RefUnwindSafe for Clause
impl Send for Clause
impl Sync for Clause
impl Unpin for Clause
impl UnwindSafe for Clause
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