Trait scyllax::collection::QueryCollection
source · 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.
Object Safety§
This trait is not object safe.