Enum cedar_policy_core::ast::ActionConstraint
source · pub enum ActionConstraint {
Any,
In(Vec<Arc<EntityUID>>),
Eq(Arc<EntityUID>),
}
Expand description
Constraint for action head variables. Action variables can be constrained to be in any variable in a list.
Variants§
Any
Unconstrained
In(Vec<Arc<EntityUID>>)
Constrained to being in a list.
Eq(Arc<EntityUID>)
Constrained to equal a specific euid.
Implementations§
source§impl ActionConstraint
impl ActionConstraint
sourcepub fn is_in(euids: impl IntoIterator<Item = EntityUID>) -> Self
pub fn is_in(euids: impl IntoIterator<Item = EntityUID>) -> Self
Action constrained to being in a list of euids.
sourcepub fn iter_euids(&self) -> impl Iterator<Item = &EntityUID>
pub fn iter_euids(&self) -> impl Iterator<Item = &EntityUID>
Get an iterator over all of the entity uids in this constraint.
Trait Implementations§
source§impl Clone for ActionConstraint
impl Clone for ActionConstraint
source§fn clone(&self) -> ActionConstraint
fn clone(&self) -> ActionConstraint
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ActionConstraint
impl Debug for ActionConstraint
source§impl<'de> Deserialize<'de> for ActionConstraint
impl<'de> Deserialize<'de> for ActionConstraint
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 Display for ActionConstraint
impl Display for ActionConstraint
source§impl From<ActionConstraint> for ActionConstraint
impl From<ActionConstraint> for ActionConstraint
source§fn from(constraint: ActionConstraint) -> ActionConstraint
fn from(constraint: ActionConstraint) -> ActionConstraint
Converts to this type from the input type.
source§impl Hash for ActionConstraint
impl Hash for ActionConstraint
source§impl PartialEq for ActionConstraint
impl PartialEq for ActionConstraint
source§impl Serialize for ActionConstraint
impl Serialize for ActionConstraint
source§impl TryFrom<ActionConstraint> for ActionConstraint
impl TryFrom<ActionConstraint> for ActionConstraint
source§type Error = EstToAstError
type Error = EstToAstError
The type returned in the event of a conversion error.
source§fn try_from(
constraint: ActionConstraint,
) -> Result<ActionConstraint, EstToAstError>
fn try_from( constraint: ActionConstraint, ) -> Result<ActionConstraint, EstToAstError>
Performs the conversion.
impl Eq for ActionConstraint
impl StructuralPartialEq for ActionConstraint
Auto Trait Implementations§
impl Freeze for ActionConstraint
impl RefUnwindSafe for ActionConstraint
impl Send for ActionConstraint
impl Sync for ActionConstraint
impl Unpin for ActionConstraint
impl UnwindSafe for ActionConstraint
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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