Struct cedar_policy_core::ast::EntityUID
source · pub struct EntityUID { /* private fields */ }
Expand description
Unique ID for an entity. These represent entities in the AST.
Implementations§
source§impl EntityUID
impl EntityUID
sourcepub fn with_eid_and_type(
typename: &str,
eid: &str
) -> Result<Self, Vec<ParseError>>
pub fn with_eid_and_type( typename: &str, eid: &str ) -> Result<Self, Vec<ParseError>>
Create an EntityUID
with the given (unqualified) typename, and the given string as its EID.
sourcepub fn components(self) -> (EntityType, Eid)
pub fn components(self) -> (EntityType, Eid)
Split into the EntityType
representing the entity type, and the Eid
representing its name
sourcepub fn from_components(name: Name, eid: Eid) -> Self
pub fn from_components(name: Name, eid: Eid) -> Self
Create a nominally-typed EntityUID
with the given typename and EID
sourcepub fn unspecified_from_eid(eid: Eid) -> Self
pub fn unspecified_from_eid(eid: Eid) -> Self
Create an unspecified EntityUID
with the given EID
sourcepub fn entity_type(&self) -> &EntityType
pub fn entity_type(&self) -> &EntityType
Get the type component.
Trait Implementations§
source§impl<'de> Deserialize<'de> for EntityUID
impl<'de> Deserialize<'de> for EntityUID
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 From<&EntityUID> for EntityUidJSON
impl From<&EntityUID> for EntityUidJSON
Convert an EntityUID to EntityUidJSON, using the ExplicitEntityEscape option
source§fn from(uid: &EntityUID) -> EntityUidJSON
fn from(uid: &EntityUID) -> EntityUidJSON
Converts to this type from the input type.
source§impl From<EntityUID> for EntityReference
impl From<EntityUID> for EntityReference
source§impl From<EntityUID> for EntityUidJSON
impl From<EntityUID> for EntityUidJSON
Convert an EntityUID to EntityUidJSON, using the ExplicitEntityEscape option
source§fn from(uid: EntityUID) -> EntityUidJSON
fn from(uid: EntityUID) -> EntityUidJSON
Converts to this type from the input type.
source§impl Ord for EntityUID
impl Ord for EntityUID
source§impl PartialEq<EntityUID> for EntityUID
impl PartialEq<EntityUID> for EntityUID
source§impl PartialOrd<EntityUID> for EntityUID
impl PartialOrd<EntityUID> for EntityUID
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl TCNode<EntityUID> for Entity
impl TCNode<EntityUID> for Entity
source§fn add_edge_to(&mut self, k: EntityUID)
fn add_edge_to(&mut self, k: EntityUID)
Add an edge out off this node to the node with key
k
.source§fn out_edges(&self) -> Box<dyn Iterator<Item = &EntityUID> + '_>
fn out_edges(&self) -> Box<dyn Iterator<Item = &EntityUID> + '_>
Retrieve an iterator for the edges out of this node.
source§fn has_edge_to(&self, e: &EntityUID) -> bool
fn has_edge_to(&self, e: &EntityUID) -> bool
Return true when their is an edge between this node and the node with
key
k
.impl Eq for EntityUID
impl StructuralEq for EntityUID
impl StructuralPartialEq for EntityUID
Auto Trait Implementations§
impl RefUnwindSafe for EntityUID
impl Send for EntityUID
impl Sync for EntityUID
impl Unpin for EntityUID
impl UnwindSafe for EntityUID
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