TxnVariant

Struct TxnVariant 

Source
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>

Source

pub fn best_effort(self) -> TxnBestEffortType<C>

Create best effort transaction from read only state

Source§

impl<C: ILazyClient> TxnVariant<Base<C>, C>

Source

pub fn new(stub: Stub<C>) -> TxnType<C>

Create new default transaction which can do query operations.

Source§

impl<C: ILazyClient> TxnVariant<Base<C>, C>

Source

pub fn mutated(self) -> TxnMutatedType<C>

Create new transaction for mutation operations.

Source§

impl<C: ILazyClient> TxnVariant<Base<C>, C>

Source

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>

Source

pub fn get_txn_context(&self) -> TxnContext

Return cloned txn context

Source

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>

Source§

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)

Performs copy-assignment from source. Read more
Source§

impl<S: Debug + IState, C: Debug + ILazyClient> Debug for TxnVariant<S, C>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<S: IState, C: ILazyClient> Deref for TxnVariant<S, C>

Source§

type Target = Box<TxnState<C>>

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl<S: IState, C: ILazyClient> DerefMut for TxnVariant<S, C>

Source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
Source§

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>>
where Q: Into<String> + Send + Sync + 'async_trait, Self: 'async_trait, 'life0: 'async_trait,

You can run a query by calling txn.query(q). Read more
Source§

fn query_rdf<'life0, 'async_trait, Q>( &'life0 mut self, query: Q, ) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>
where Q: Into<String> + Send + Sync + 'async_trait, Self: 'async_trait, 'life0: 'async_trait,

You can run a query with rdf response by calling txn.query_rdf(q). Read more
Source§

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>>
where Q: Into<String> + Send + Sync + 'async_trait, K: Into<String> + Send + Sync + Eq + Hash + 'async_trait, V: Into<String> + Send + Sync + 'async_trait, Self: 'async_trait, 'life0: 'async_trait,

You can run a query with defined variables by calling txn.query_with_vars(q, vars). Read more
Source§

fn query_rdf_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>>
where Q: Into<String> + Send + Sync + 'async_trait, K: Into<String> + Send + Sync + Eq + Hash + 'async_trait, V: Into<String> + Send + Sync + 'async_trait, Self: 'async_trait, 'life0: 'async_trait,

You can run a query with defined variables and rdf response by calling txn.query_rdf_with_vars(q, vars). Read more

Auto Trait Implementations§

§

impl<S, C> Freeze for TxnVariant<S, C>
where S: Freeze,

§

impl<S, C> RefUnwindSafe for TxnVariant<S, C>

§

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more