Trait Executor

Source
pub trait Executor:
    Sealed
    + Send
    + Sync
    + Debug {
    // Required methods
    fn send_encoded_request<'life0, 'async_trait>(
        &'life0 self,
        request: EncodedRequest,
    ) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn stream(&self) -> Stream;
    fn transaction_builder(&self) -> TransactionBuilder;
    fn transaction<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<Transaction>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_cached_sql_statement_id<'life0, 'life1, 'async_trait>(
        &'life0 self,
        statement: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Option<u64>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Type, which can make requests to Tarantool and create streams and transactions.

Required Methods§

Source

fn send_encoded_request<'life0, 'async_trait>( &'life0 self, request: EncodedRequest, ) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Send encoded request.

Source

fn stream(&self) -> Stream

Get new Stream.

It is safe to create Stream from any type, implementing current trait.

Source

fn transaction_builder(&self) -> TransactionBuilder

Prepare TransactionBuilder, which can be used to override parameters and create Transaction.

It is safe to create TransactionBuilder from any type.

Source

fn transaction<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Transaction>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Create Transaction with parameters from builder.

It is safe to create Transaction from any type, implementing current trait.

Source

fn get_cached_sql_statement_id<'life0, 'life1, 'async_trait>( &'life0 self, statement: &'life1 str, ) -> Pin<Box<dyn Future<Output = Option<u64>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Implementations on Foreign Types§

Source§

impl<E: Executor + Sealed + Sync + Debug> Executor for &E

Source§

fn send_encoded_request<'life0, 'async_trait>( &'life0 self, request: EncodedRequest, ) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn stream(&self) -> Stream

Source§

fn transaction_builder(&self) -> TransactionBuilder

Source§

fn transaction<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Transaction>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn get_cached_sql_statement_id<'life0, 'life1, 'async_trait>( &'life0 self, statement: &'life1 str, ) -> Pin<Box<dyn Future<Output = Option<u64>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

impl<E: Executor + Sealed + Sync + Debug> Executor for &mut E

Source§

fn send_encoded_request<'life0, 'async_trait>( &'life0 self, request: EncodedRequest, ) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn stream(&self) -> Stream

Source§

fn transaction_builder(&self) -> TransactionBuilder

Source§

fn transaction<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Transaction>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn get_cached_sql_statement_id<'life0, 'life1, 'async_trait>( &'life0 self, statement: &'life1 str, ) -> Pin<Box<dyn Future<Output = Option<u64>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Implementors§