pub enum EntityUIDEntry {
Known {
euid: Arc<EntityUID>,
loc: Option<Loc>,
},
Unknown {
ty: Option<EntityType>,
loc: Option<Loc>,
},
}
Expand description
An entry in a request for a Entity UID. It may either be a concrete EUID or an unknown in the case of partial evaluation
Variants§
Implementations§
Source§impl EntityUIDEntry
impl EntityUIDEntry
Sourcepub fn evaluate(&self, var: Var) -> PartialValue
pub fn evaluate(&self, var: Var) -> PartialValue
Evaluate the entry to either:
A value, if the entry is concrete
An unknown corresponding to the passed var
Sourcepub fn known(euid: EntityUID, loc: Option<Loc>) -> Self
pub fn known(euid: EntityUID, loc: Option<Loc>) -> Self
Create an entry with a concrete EntityUID and the given source location
Sourcepub fn unknown_with_type(ty: EntityType, loc: Option<Loc>) -> Self
pub fn unknown_with_type(ty: EntityType, loc: Option<Loc>) -> Self
Create an entry with an unknown EntityUID but known EntityType
Sourcepub fn uid(&self) -> Option<&EntityUID>
pub fn uid(&self) -> Option<&EntityUID>
Get the UID of the entry, or None
if it is unknown (partial evaluation)
Sourcepub fn get_type(&self) -> Option<&EntityType>
pub fn get_type(&self) -> Option<&EntityType>
Get the type of the entry, or None
if it is unknown (partial evaluation with no type annotation)
Trait Implementations§
Source§impl Clone for EntityUIDEntry
impl Clone for EntityUIDEntry
Source§fn clone(&self) -> EntityUIDEntry
fn clone(&self) -> EntityUIDEntry
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 EntityUIDEntry
impl Debug for EntityUIDEntry
Auto Trait Implementations§
impl Freeze for EntityUIDEntry
impl RefUnwindSafe for EntityUIDEntry
impl Send for EntityUIDEntry
impl Sync for EntityUIDEntry
impl Unpin for EntityUIDEntry
impl UnwindSafe for EntityUIDEntry
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