Struct typedb_driver::concept::Entity
source · 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: IIDThe unique id of this Entity
type_: EntityTypeThe type which this Entity belongs to
is_inferred: boolIf this Thing is inferred by a [Reasoning Rule] or not
Trait Implementations§
source§impl PartialEq for Entity
impl PartialEq for Entity
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
Attributes that this Thing owns. Optionally, filtered by an AttributeType or a list of AttributeTypes. Optionally, filtered by Annotations. 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 StructuralEq for Entity
impl StructuralPartialEq for Entity
Auto Trait Implementations§
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<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.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§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