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.
sourcepub fn iter_entity_type_names(&self) -> impl Iterator<Item = &Name>
pub fn iter_entity_type_names(&self) -> impl Iterator<Item = &Name>
Get an iterator over all of the entity types in this constraint.
The Unspecified entity type does not have a Name
, so it is excluded
from this iter.
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§fn eq(&self, other: &ActionConstraint) -> bool
fn eq(&self, other: &ActionConstraint) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for ActionConstraint
impl Serialize for ActionConstraint
source§impl TryFrom<ActionConstraint> for ActionConstraint
impl TryFrom<ActionConstraint> for ActionConstraint
§type Error = FromJsonError
type Error = FromJsonError
The type returned in the event of a conversion error.
source§fn try_from(
constraint: ActionConstraint
) -> Result<ActionConstraint, Self::Error>
fn try_from( constraint: ActionConstraint ) -> Result<ActionConstraint, Self::Error>
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