pub struct Entity {
pub iid: IID,
pub type_: EntityType,
pub is_inferred: bool,
}
Expand description
Instance of data of an entity type, representing a standalone object that exists in the data model independently. Entity does not have a value. It is usually addressed by its ownership over attribute instances and/or roles played in relation instances.
Fields§
§iid: IID
The unique id of this Entity
type_: EntityType
The type which this Entity belongs to
is_inferred: bool
If this Thing is inferred by a [Reasoning Rule] or not
Trait Implementations§
Source§impl ThingAPI for Entity
impl ThingAPI for Entity
Source§fn is_inferred(&self) -> bool
fn is_inferred(&self) -> bool
Checks if this
Thing
is inferred by a [Reasoning Rule]. Read morefn to_thing_cloned(&self) -> Thing
Source§fn is_deleted<'tx>(
&self,
transaction: &'tx Transaction<'_>,
) -> BoxPromise<'tx, Result<bool>>
fn is_deleted<'tx>( &self, transaction: &'tx Transaction<'_>, ) -> BoxPromise<'tx, Result<bool>>
Checks if this
Thing
is deleted. Read moreSource§fn delete<'tx>(
&self,
transaction: &'tx Transaction<'_>,
) -> BoxPromise<'tx, Result>
fn delete<'tx>( &self, transaction: &'tx Transaction<'_>, ) -> BoxPromise<'tx, Result>
Deletes this
Thing
. Read moreSource§fn get_has<'tx>(
&self,
transaction: &'tx Transaction<'_>,
attribute_types: Vec<AttributeType>,
annotations: Vec<Annotation>,
) -> Result<BoxStream<'tx, Result<Attribute>>>
fn get_has<'tx>( &self, transaction: &'tx Transaction<'_>, attribute_types: Vec<AttributeType>, annotations: Vec<Annotation>, ) -> Result<BoxStream<'tx, Result<Attribute>>>
Retrieves the
Attribute
s that this Thing
owns. Optionally, filtered by an AttributeType
or a list of AttributeType
s. Optionally, filtered by Annotation
s. Read moreSource§fn set_has<'tx>(
&self,
transaction: &'tx Transaction<'_>,
attribute: Attribute,
) -> BoxPromise<'tx, Result>
fn set_has<'tx>( &self, transaction: &'tx Transaction<'_>, attribute: Attribute, ) -> BoxPromise<'tx, Result>
Source§fn unset_has<'tx>(
&self,
transaction: &'tx Transaction<'_>,
attribute: Attribute,
) -> BoxPromise<'tx, Result>
fn unset_has<'tx>( &self, transaction: &'tx Transaction<'_>, attribute: Attribute, ) -> BoxPromise<'tx, Result>
Source§fn get_relations<'tx>(
&self,
transaction: &'tx Transaction<'_>,
role_types: Vec<RoleType>,
) -> Result<BoxStream<'tx, Result<Relation>>>
fn get_relations<'tx>( &self, transaction: &'tx Transaction<'_>, role_types: Vec<RoleType>, ) -> Result<BoxStream<'tx, Result<Relation>>>
Retrieves all the
Relations
which this Thing
plays a role in, optionally filtered by one or more given roles. Read moreSource§fn get_playing<'tx>(
&self,
transaction: &'tx Transaction<'_>,
) -> Result<BoxStream<'tx, Result<RoleType>>>
fn get_playing<'tx>( &self, transaction: &'tx Transaction<'_>, ) -> Result<BoxStream<'tx, Result<RoleType>>>
Retrieves the roles that this
Thing
is currently playing. Read moreimpl EntityAPI for Entity
impl Eq for Entity
impl StructuralPartialEq for Entity
Auto Trait Implementations§
impl Freeze for Entity
impl RefUnwindSafe for Entity
impl Send for Entity
impl Sync for Entity
impl Unpin for Entity
impl UnwindSafe for Entity
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> 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<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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request