Struct typedb_driver::transaction::concept::ConceptManager
source · pub struct ConceptManager<'tx> { /* private fields */ }Expand description
Provides access for all Concept API methods.
Implementations§
source§impl<'tx> ConceptManager<'tx>
impl<'tx> ConceptManager<'tx>
sourcepub fn get_entity_type(
&self,
label: String
) -> impl Promise<'tx, Result<Option<EntityType>>>
pub fn get_entity_type( &self, label: String ) -> impl Promise<'tx, Result<Option<EntityType>>>
sourcepub fn get_relation_type(
&self,
label: String
) -> impl Promise<'tx, Result<Option<RelationType>>>
pub fn get_relation_type( &self, label: String ) -> impl Promise<'tx, Result<Option<RelationType>>>
sourcepub fn get_attribute_type(
&self,
label: String
) -> impl Promise<'tx, Result<Option<AttributeType>>>
pub fn get_attribute_type( &self, label: String ) -> impl Promise<'tx, Result<Option<AttributeType>>>
sourcepub fn put_entity_type(
&self,
label: String
) -> impl Promise<'tx, Result<EntityType>>
pub fn put_entity_type( &self, label: String ) -> impl Promise<'tx, Result<EntityType>>
sourcepub fn put_relation_type(
&self,
label: String
) -> impl Promise<'tx, Result<RelationType>>
pub fn put_relation_type( &self, label: String ) -> impl Promise<'tx, Result<RelationType>>
sourcepub fn put_attribute_type(
&self,
label: String,
value_type: ValueType
) -> impl Promise<'tx, Result<AttributeType>>
pub fn put_attribute_type( &self, label: String, value_type: ValueType ) -> impl Promise<'tx, Result<AttributeType>>
Creates a new AttributeType if none exists with the given label, or retrieves the existing one.
or retrieve. :return:
Arguments
label– The label of theAttributeTypeto create or retrievevalue_type– The value type of theAttributeTypeto create
Examples
transaction.concepts().put_attribute_type(label, value_type).awaitsourcepub fn get_schema_exceptions(
&self
) -> Result<impl Stream<Item = Result<SchemaException>> + 'tx>
pub fn get_schema_exceptions( &self ) -> Result<impl Stream<Item = Result<SchemaException>> + 'tx>
Retrieves a list of all schema exceptions for the current transaction.
Examples
transaction.concepts().get_schema_exceptions()Trait Implementations§
Auto Trait Implementations§
impl<'tx> !RefUnwindSafe for ConceptManager<'tx>
impl<'tx> Send for ConceptManager<'tx>
impl<'tx> Sync for ConceptManager<'tx>
impl<'tx> Unpin for ConceptManager<'tx>
impl<'tx> !UnwindSafe for ConceptManager<'tx>
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