pub enum EntityUID {
EntityUID(EntityUIDImpl),
}
Expand description
Unique ID for an entity. These represent entities in the AST.
Variants§
EntityUID(EntityUIDImpl)
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<ActionEntityUID<Name>> for EntityUID
impl From<ActionEntityUID<Name>> for EntityUID
Source§fn from(aeuid: ActionEntityUID<Name>) -> Self
fn from(aeuid: ActionEntityUID<Name>) -> Self
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§fn reset_edges(&mut self)
fn reset_edges(&mut self)
Resets edges to base
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
.Source§fn reset_edges(&mut self)
fn reset_edges(&mut self)
Resets edges to base
Source§impl TCNode<EntityUID> for ValidatorActionId
impl TCNode<EntityUID> for ValidatorActionId
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§fn reset_edges(&mut self)
fn reset_edges(&mut self)
Resets edges to base
Source§impl TryFrom<ActionEntityUID<InternalName>> for EntityUID
impl TryFrom<ActionEntityUID<InternalName>> for EntityUID
Source§type Error = <InternalName as TryInto<Name>>::Error
type Error = <InternalName as TryInto<Name>>::Error
The type returned in the event of a conversion error.
Source§fn try_from(
aeuid: ActionEntityUID<InternalName>,
) -> Result<Self, <InternalName as TryInto<Name>>::Error>
fn try_from( aeuid: ActionEntityUID<InternalName>, ) -> Result<Self, <InternalName as TryInto<Name>>::Error>
Performs the conversion.
impl Eq for EntityUIDwhere
EntityUIDImpl: PartialEq,
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.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