pub struct TxnVariant<S: IState, C: ILazyClient> { /* private fields */ }Expand description
Type state for Transaction variants
Implementations§
Source§impl<C: ILazyClient> TxnVariant<ReadOnly<C>, C>
impl<C: ILazyClient> TxnVariant<ReadOnly<C>, C>
Sourcepub fn best_effort(self) -> TxnBestEffortType<C>
pub fn best_effort(self) -> TxnBestEffortType<C>
Create best effort transaction from read only state
Source§impl<C: ILazyClient> TxnVariant<Base<C>, C>
impl<C: ILazyClient> TxnVariant<Base<C>, C>
Source§impl<C: ILazyClient> TxnVariant<Base<C>, C>
impl<C: ILazyClient> TxnVariant<Base<C>, C>
Sourcepub fn mutated(self) -> TxnMutatedType<C>
pub fn mutated(self) -> TxnMutatedType<C>
Create new transaction for mutation operations.
Source§impl<C: ILazyClient> TxnVariant<Base<C>, C>
impl<C: ILazyClient> TxnVariant<Base<C>, C>
Sourcepub fn read_only(self) -> TxnReadOnlyType<C>
pub fn read_only(self) -> TxnReadOnlyType<C>
Create new read only transaction from default transaction state
Source§impl<S: IState, C: ILazyClient> TxnVariant<S, C>
impl<S: IState, C: ILazyClient> TxnVariant<S, C>
Sourcepub fn get_txn_context(&self) -> TxnContext
pub fn get_txn_context(&self) -> TxnContext
Return cloned txn context
Sourcepub fn clone_and_reset(&mut self) -> Self
pub fn clone_and_reset(&mut self) -> Self
Return new transaction of same variant with default state
Trait Implementations§
Source§impl<S: Clone + IState, C: Clone + ILazyClient> Clone for TxnVariant<S, C>
impl<S: Clone + IState, C: Clone + ILazyClient> Clone for TxnVariant<S, C>
Source§fn clone(&self) -> TxnVariant<S, C>
fn clone(&self) -> TxnVariant<S, C>
Returns a duplicate 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<S: IState, C: ILazyClient> Deref for TxnVariant<S, C>
impl<S: IState, C: ILazyClient> Deref for TxnVariant<S, C>
Source§impl<S: IState, C: ILazyClient> DerefMut for TxnVariant<S, C>
impl<S: IState, C: ILazyClient> DerefMut for TxnVariant<S, C>
Source§impl<S: IState, C: ILazyClient> Query for TxnVariant<S, C>
impl<S: IState, C: ILazyClient> Query for TxnVariant<S, C>
Source§fn query<'life0, 'async_trait, Q>(
&'life0 mut self,
query: Q,
) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>
fn query<'life0, 'async_trait, Q>( &'life0 mut self, query: Q, ) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>
You can run a query by calling
txn.query(q). Read moreSource§fn query_rdf<'life0, 'async_trait, Q>(
&'life0 mut self,
query: Q,
) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>
fn query_rdf<'life0, 'async_trait, Q>( &'life0 mut self, query: Q, ) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>
You can run a query with rdf response by calling
txn.query_rdf(q). Read moreSource§fn query_with_vars<'life0, 'async_trait, Q, K, V>(
&'life0 mut self,
query: Q,
vars: HashMap<K, V>,
) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>
fn query_with_vars<'life0, 'async_trait, Q, K, V>( &'life0 mut self, query: Q, vars: HashMap<K, V>, ) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>
You can run a query with defined variables by calling
txn.query_with_vars(q, vars). Read moreAuto Trait Implementations§
impl<S, C> Freeze for TxnVariant<S, C>where
S: Freeze,
impl<S, C> RefUnwindSafe for TxnVariant<S, C>where
S: RefUnwindSafe,
C: RefUnwindSafe,
impl<S, C> Send for TxnVariant<S, C>
impl<S, C> Sync for TxnVariant<S, C>
impl<S, C> Unpin for TxnVariant<S, C>where
S: Unpin,
impl<S, C> UnwindSafe for TxnVariant<S, C>where
S: UnwindSafe,
C: UnwindSafe,
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> 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> 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