pub trait QueryCollection {
// Required methods
fn new<'life0, 'async_trait>(
session: &'life0 Session,
) -> Pin<Box<dyn Future<Output = Result<Self, ScyllaxError>> + Send + 'async_trait>>
where Self: Sized + 'async_trait,
'life0: 'async_trait;
fn register_tasks(self, executor: Arc<Executor<Self>>) -> Self
where Self: Sized;
// Provided methods
fn get_prepared<T: Query>(&self) -> &PreparedStatement
where Self: GetPreparedStatement<T> { ... }
fn get_task<T: Query + ReadQuery>(&self) -> &Sender<ShardMessage<T>>
where Self: GetCoalescingSender<T> { ... }
}
Expand description
A collection of prepared statements.
Required Methods§
Sourcefn new<'life0, 'async_trait>(
session: &'life0 Session,
) -> Pin<Box<dyn Future<Output = Result<Self, ScyllaxError>> + Send + 'async_trait>>where
Self: Sized + 'async_trait,
'life0: 'async_trait,
fn new<'life0, 'async_trait>(
session: &'life0 Session,
) -> Pin<Box<dyn Future<Output = Result<Self, ScyllaxError>> + Send + 'async_trait>>where
Self: Sized + 'async_trait,
'life0: 'async_trait,
Create a new collection of prepared statements.
Sourcefn register_tasks(self, executor: Arc<Executor<Self>>) -> Selfwhere
Self: Sized,
fn register_tasks(self, executor: Arc<Executor<Self>>) -> Selfwhere
Self: Sized,
Register all tasks with the executor.
Provided Methods§
Sourcefn get_prepared<T: Query>(&self) -> &PreparedStatementwhere
Self: GetPreparedStatement<T>,
fn get_prepared<T: Query>(&self) -> &PreparedStatementwhere
Self: GetPreparedStatement<T>,
Gets a prepared statement from the collection.
Sourcefn get_task<T: Query + ReadQuery>(&self) -> &Sender<ShardMessage<T>>where
Self: GetCoalescingSender<T>,
fn get_task<T: Query + ReadQuery>(&self) -> &Sender<ShardMessage<T>>where
Self: GetCoalescingSender<T>,
Gets a task from the collection.
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.