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, ParseErrors>
 
pub fn with_eid_and_type(typename: &str, eid: &str) -> Result<Self, ParseErrors>
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(ty: EntityType, eid: Eid, loc: Option<Loc>) -> Self
 
pub fn from_components(ty: EntityType, eid: Eid, loc: Option<Loc>) -> Self
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<'de, C: DeserializationContext> DeserializeAs<'de, EntityUID> for EntityUidJson<C>
 
impl<'de, C: DeserializationContext> DeserializeAs<'de, EntityUID> for EntityUidJson<C>
Source§fn deserialize_as<D>(deserializer: D) -> Result<EntityUID, D::Error>where
    D: Deserializer<'de>,
 
fn deserialize_as<D>(deserializer: D) -> Result<EntityUID, D::Error>where
    D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer.
Source§impl From<&EntityUID> for EntityUidJson
Convert an EntityUID to EntityUidJson, using the ExplicitEntityEscape option
 
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
Convert an EntityUID to EntityUidJson, using the ExplicitEntityEscape option
 
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 FromNormalizedStr for EntityUID
 
impl FromNormalizedStr for EntityUID
Source§fn describe_self() -> &'static str
 
fn describe_self() -> &'static str
Short string description of the 
Self type, to be used in error messages.
What are we trying to parse?Source§fn from_normalized_str(s: &str) -> Result<Self, ParseErrors>
 
fn from_normalized_str(s: &str) -> Result<Self, ParseErrors>
Create a 
Self by parsing a string, which is required to be normalized.
That is, the input is required to roundtrip with the Display impl on Self:
Self::from_normalized_str(x).to_string() == x must hold. Read moreSource§impl Ord for EntityUID
 
impl Ord for EntityUID
Source§impl PartialOrd for EntityUID
 
impl PartialOrd for EntityUID
Source§impl<C> SerializeAs<EntityUID> for EntityUidJson<C>
 
impl<C> SerializeAs<EntityUID> for EntityUidJson<C>
Source§fn serialize_as<S>(source: &EntityUID, serializer: S) -> Result<S::Ok, S::Error>where
    S: Serializer,
 
fn serialize_as<S>(source: &EntityUID, serializer: S) -> Result<S::Ok, S::Error>where
    S: Serializer,
Serialize this value into the given Serde serializer.
Source§impl TCNode<EntityUID> for Arc<Entity>
 
impl TCNode<EntityUID> for Arc<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.Source§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
Auto Trait Implementations§
impl Freeze for EntityUID
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
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