Enum typedb_driver::concept::Thing
source · pub enum Thing {
Entity(Entity),
Relation(Relation),
Attribute(Attribute),
}
Variants§
Implementations§
Trait Implementations§
source§impl PartialEq for Thing
impl PartialEq for Thing
source§impl ThingAPI for Thing
impl ThingAPI for Thing
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 StructuralPartialEq for Thing
Auto Trait Implementations§
impl RefUnwindSafe for Thing
impl Send for Thing
impl Sync for Thing
impl Unpin for Thing
impl UnwindSafe for Thing
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
§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