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§
Sourcefn 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 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.
Sourcefn stream(&self) -> Stream
fn stream(&self) -> Stream
Get new Stream
.
It is safe to create Stream
from any type, implementing current trait.
Sourcefn transaction_builder(&self) -> TransactionBuilder
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.
Sourcefn transaction<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Transaction>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
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.