pub trait ExecutorExt: Executor {
Show 14 methods
// Required method
fn send_request<R>(&self, body: R) -> BoxFuture<'_, Result<Value>>
where R: Request;
// Provided methods
fn ping<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn eval<'life0, 'async_trait, A, I>(
&'life0 self,
expr: I,
args: A,
) -> Pin<Box<dyn Future<Output = Result<CallResponse>> + Send + 'async_trait>>
where A: Tuple + Send + 'async_trait,
I: AsRef<str> + Send + Sync + 'async_trait,
Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn call<'life0, 'async_trait, A, I>(
&'life0 self,
function_name: I,
args: A,
) -> Pin<Box<dyn Future<Output = Result<CallResponse>> + Send + 'async_trait>>
where A: Tuple + Send + 'async_trait,
I: AsRef<str> + Send + Sync + 'async_trait,
Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn select<'life0, 'async_trait, T, A>(
&'life0 self,
space_id: u32,
index_id: u32,
limit: Option<u32>,
offset: Option<u32>,
iterator: Option<IteratorType>,
keys: A,
) -> Pin<Box<dyn Future<Output = Result<Vec<T>>> + Send + 'async_trait>>
where T: DeserializeOwned + 'async_trait,
A: Tuple + Send + 'async_trait,
Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn insert<'life0, 'async_trait, T>(
&'life0 self,
space_id: u32,
tuple: T,
) -> Pin<Box<dyn Future<Output = Result<DmoResponse>> + Send + 'async_trait>>
where T: Tuple + Send + 'async_trait,
Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn update<'life0, 'async_trait, K, O>(
&'life0 self,
space_id: u32,
index_id: u32,
keys: K,
ops: O,
) -> Pin<Box<dyn Future<Output = Result<DmoResponse>> + Send + 'async_trait>>
where K: Tuple + Send + 'async_trait,
O: Tuple + Send + 'async_trait,
Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn upsert<'life0, 'async_trait, T, O>(
&'life0 self,
space_id: u32,
tuple: T,
ops: O,
) -> Pin<Box<dyn Future<Output = Result<DmoResponse>> + Send + 'async_trait>>
where T: Tuple + Send + 'async_trait,
O: Tuple + Send + 'async_trait,
Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn replace<'life0, 'async_trait, T>(
&'life0 self,
space_id: u32,
tuple: T,
) -> Pin<Box<dyn Future<Output = Result<DmoResponse>> + Send + 'async_trait>>
where T: Tuple + Send + 'async_trait,
Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn delete<'life0, 'async_trait, T>(
&'life0 self,
space_id: u32,
index_id: u32,
keys: T,
) -> Pin<Box<dyn Future<Output = Result<DmoResponse>> + Send + 'async_trait>>
where T: Tuple + Send + 'async_trait,
Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn execute_sql<'life0, 'async_trait, T, I>(
&'life0 self,
query: I,
binds: T,
) -> Pin<Box<dyn Future<Output = Result<SqlResponse>> + Send + 'async_trait>>
where T: Tuple + Send + 'async_trait,
I: AsRef<str> + Send + Sync + 'async_trait,
Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn prepare_sql<'life0, 'async_trait, I>(
&'life0 self,
query: I,
) -> Pin<Box<dyn Future<Output = Result<PreparedSqlStatement<&Self>>> + Send + 'async_trait>>
where I: AsRef<str> + Send + Sync + 'async_trait,
Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn space<'life0, 'async_trait, K>(
&'life0 self,
key: K,
) -> Pin<Box<dyn Future<Output = Result<Option<Space<&Self>>>> + Send + 'async_trait>>
where Self: Sized + Send + Sync + 'async_trait,
K: Into<SchemaEntityKey> + Send + 'async_trait,
'life0: 'async_trait { ... }
fn into_space<'async_trait, K>(
self,
key: K,
) -> Pin<Box<dyn Future<Output = Result<Option<Space<Self>>>> + Send + 'async_trait>>
where Self: Sized + Send + Send + 'async_trait,
K: Into<SchemaEntityKey> + Send + 'async_trait { ... }
}
Expand description
Helper trait around Executor
trait, which allows to send specific requests
with any type, implementing Execitor
trait.
Required Methods§
Sourcefn send_request<R>(&self, body: R) -> BoxFuture<'_, Result<Value>>where
R: Request,
fn send_request<R>(&self, body: R) -> BoxFuture<'_, Result<Value>>where
R: Request,
Send request, receiving raw response body.
It is not recommended to use this method directly, since some requests should be only sent in specific situations and might break connection.
Provided Methods§
Sourcefn ping<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn ping<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Ping tarantool instance.
Sourcefn eval<'life0, 'async_trait, A, I>(
&'life0 self,
expr: I,
args: A,
) -> Pin<Box<dyn Future<Output = Result<CallResponse>> + Send + 'async_trait>>
fn eval<'life0, 'async_trait, A, I>( &'life0 self, expr: I, args: A, ) -> Pin<Box<dyn Future<Output = Result<CallResponse>> + Send + 'async_trait>>
Evaluate Lua expression.
Check docs on how to deserialize response.
Sourcefn call<'life0, 'async_trait, A, I>(
&'life0 self,
function_name: I,
args: A,
) -> Pin<Box<dyn Future<Output = Result<CallResponse>> + Send + 'async_trait>>
fn call<'life0, 'async_trait, A, I>( &'life0 self, function_name: I, args: A, ) -> Pin<Box<dyn Future<Output = Result<CallResponse>> + Send + 'async_trait>>
Remotely call function in Tarantool.
Check docs on how to deserialize response.
Sourcefn select<'life0, 'async_trait, T, A>(
&'life0 self,
space_id: u32,
index_id: u32,
limit: Option<u32>,
offset: Option<u32>,
iterator: Option<IteratorType>,
keys: A,
) -> Pin<Box<dyn Future<Output = Result<Vec<T>>> + Send + 'async_trait>>where
T: DeserializeOwned + 'async_trait,
A: Tuple + Send + 'async_trait,
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn select<'life0, 'async_trait, T, A>(
&'life0 self,
space_id: u32,
index_id: u32,
limit: Option<u32>,
offset: Option<u32>,
iterator: Option<IteratorType>,
keys: A,
) -> Pin<Box<dyn Future<Output = Result<Vec<T>>> + Send + 'async_trait>>where
T: DeserializeOwned + 'async_trait,
A: Tuple + Send + 'async_trait,
Self: Sync + 'async_trait,
'life0: 'async_trait,
Select tuples from space.
Sourcefn insert<'life0, 'async_trait, T>(
&'life0 self,
space_id: u32,
tuple: T,
) -> Pin<Box<dyn Future<Output = Result<DmoResponse>> + Send + 'async_trait>>
fn insert<'life0, 'async_trait, T>( &'life0 self, space_id: u32, tuple: T, ) -> Pin<Box<dyn Future<Output = Result<DmoResponse>> + Send + 'async_trait>>
Insert tuple.
Sourcefn update<'life0, 'async_trait, K, O>(
&'life0 self,
space_id: u32,
index_id: u32,
keys: K,
ops: O,
) -> Pin<Box<dyn Future<Output = Result<DmoResponse>> + Send + 'async_trait>>
fn update<'life0, 'async_trait, K, O>( &'life0 self, space_id: u32, index_id: u32, keys: K, ops: O, ) -> Pin<Box<dyn Future<Output = Result<DmoResponse>> + Send + 'async_trait>>
Update tuple.
Sourcefn upsert<'life0, 'async_trait, T, O>(
&'life0 self,
space_id: u32,
tuple: T,
ops: O,
) -> Pin<Box<dyn Future<Output = Result<DmoResponse>> + Send + 'async_trait>>
fn upsert<'life0, 'async_trait, T, O>( &'life0 self, space_id: u32, tuple: T, ops: O, ) -> Pin<Box<dyn Future<Output = Result<DmoResponse>> + Send + 'async_trait>>
Update or insert tuple.
Sourcefn replace<'life0, 'async_trait, T>(
&'life0 self,
space_id: u32,
tuple: T,
) -> Pin<Box<dyn Future<Output = Result<DmoResponse>> + Send + 'async_trait>>
fn replace<'life0, 'async_trait, T>( &'life0 self, space_id: u32, tuple: T, ) -> Pin<Box<dyn Future<Output = Result<DmoResponse>> + Send + 'async_trait>>
Insert a tuple into a space. If a tuple with the same primary key already exists, replaces the existing tuple with a new one.
Sourcefn delete<'life0, 'async_trait, T>(
&'life0 self,
space_id: u32,
index_id: u32,
keys: T,
) -> Pin<Box<dyn Future<Output = Result<DmoResponse>> + Send + 'async_trait>>
fn delete<'life0, 'async_trait, T>( &'life0 self, space_id: u32, index_id: u32, keys: T, ) -> Pin<Box<dyn Future<Output = Result<DmoResponse>> + Send + 'async_trait>>
Delete a tuple identified by the primary key.
Sourcefn execute_sql<'life0, 'async_trait, T, I>(
&'life0 self,
query: I,
binds: T,
) -> Pin<Box<dyn Future<Output = Result<SqlResponse>> + Send + 'async_trait>>
fn execute_sql<'life0, 'async_trait, T, I>( &'life0 self, query: I, binds: T, ) -> Pin<Box<dyn Future<Output = Result<SqlResponse>> + Send + 'async_trait>>
Perform SQL query.
Sourcefn prepare_sql<'life0, 'async_trait, I>(
&'life0 self,
query: I,
) -> Pin<Box<dyn Future<Output = Result<PreparedSqlStatement<&Self>>> + Send + 'async_trait>>
fn prepare_sql<'life0, 'async_trait, I>( &'life0 self, query: I, ) -> Pin<Box<dyn Future<Output = Result<PreparedSqlStatement<&Self>>> + Send + 'async_trait>>
Prepare SQL statement.
Sourcefn space<'life0, 'async_trait, K>(
&'life0 self,
key: K,
) -> Pin<Box<dyn Future<Output = Result<Option<Space<&Self>>>> + Send + 'async_trait>>
fn space<'life0, 'async_trait, K>( &'life0 self, key: K, ) -> Pin<Box<dyn Future<Output = Result<Option<Space<&Self>>>> + Send + 'async_trait>>
Find and load space by key.
Can be called with space’s index (if passed unsigned integer) or name (if passed &str
).
Returned Space
object contains reference to current executor.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.