[−][src]Struct cdrs_tokio::cluster::session::Session
CDRS session that holds one pool of authorized connecitons per node.
compression
field contains data compressor that will be used
for decompressing data received from Cassandra server.
Fields
compression: Compression
Implementations
impl<'a, LB: Sized> Session<LB>
[src]
pub fn paged<T: CDRSTransport + Unpin + 'static, M: ManageConnection<Connection = Mutex<T>, Error = Error>>(
&'a mut self,
page_size: i32
) -> SessionPager<'a, M, Session<LB>, T> where
Session<LB>: CDRSSession<'static, T, M>,
[src]
&'a mut self,
page_size: i32
) -> SessionPager<'a, M, Session<LB>, T> where
Session<LB>: CDRSSession<'static, T, M>,
Basing on current session returns new SessionPager
that can be used
for performing paged queries.
impl<'a, L> Session<L>
[src]
pub async fn listen<A: Authenticator + 'static + Sized, '_, '_>(
&'_ self,
node: &'_ str,
authenticator: A,
events: Vec<SimpleServerEvent>
) -> Result<(Listener<Mutex<TransportTcp>>, EventStream)>
[src]
&'_ self,
node: &'_ str,
authenticator: A,
events: Vec<SimpleServerEvent>
) -> Result<(Listener<Mutex<TransportTcp>>, EventStream)>
Returns new event listener.
pub async fn listen_non_blocking<A: Authenticator + 'static + Sized, '_, '_>(
&'_ self,
node: &'_ str,
authenticator: A,
events: Vec<SimpleServerEvent>
) -> Result<(Listener<Mutex<TransportTcp>>, EventStreamNonBlocking)>
[src]
&'_ self,
node: &'_ str,
authenticator: A,
events: Vec<SimpleServerEvent>
) -> Result<(Listener<Mutex<TransportTcp>>, EventStreamNonBlocking)>
Trait Implementations
impl<'a, T: CDRSTransport + Unpin + 'static, LB: LoadBalancingStrategy<ConnectionPool<M>> + Sized + Send + Sync, M: ManageConnection<Connection = Mutex<T>, Error = Error> + Sized> BatchExecutor<T, M> for Session<LB>
[src]
#[must_use]fn batch_with_params_tw<'life0, 'async_trait>(
&'life0 self,
batch: QueryBatch,
with_tracing: bool,
with_warnings: bool
) -> Pin<Box<dyn Future<Output = Result<Frame>> + Send + 'async_trait>> where
Self: Sized,
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
batch: QueryBatch,
with_tracing: bool,
with_warnings: bool
) -> Pin<Box<dyn Future<Output = Result<Frame>> + Send + 'async_trait>> where
Self: Sized,
'life0: 'async_trait,
Self: 'async_trait,
#[must_use]fn batch_with_params<'life0, 'async_trait>(
&'life0 self,
batch: QueryBatch
) -> Pin<Box<dyn Future<Output = Result<Frame>> + Send + 'async_trait>> where
Self: Sized,
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
batch: QueryBatch
) -> Pin<Box<dyn Future<Output = Result<Frame>> + Send + 'async_trait>> where
Self: Sized,
'life0: 'async_trait,
Self: 'async_trait,
impl<'a, T: CDRSTransport + Unpin + 'static, M: ManageConnection<Connection = Mutex<T>, Error = Error> + Sized, LB: LoadBalancingStrategy<ConnectionPool<M>> + Sized + Send + Sync> CDRSSession<'a, T, M> for Session<LB>
[src]
impl<LB: Debug> Debug for Session<LB>
[src]
impl<'a, T: CDRSTransport + Unpin + 'static, LB: LoadBalancingStrategy<ConnectionPool<M>> + Sized + Send + Sync, M: ManageConnection<Connection = Mutex<T>, Error = Error> + Sized> ExecExecutor<T, M> for Session<LB>
[src]
#[must_use]fn exec_with_params_tw<'life0, 'life1, 'async_trait>(
&'life0 self,
prepared: &'life1 CBytesShort,
query_parameters: QueryParams,
with_tracing: bool,
with_warnings: bool
) -> Pin<Box<dyn Future<Output = Result<Frame>> + Send + 'async_trait>> where
Self: Sized,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
prepared: &'life1 CBytesShort,
query_parameters: QueryParams,
with_tracing: bool,
with_warnings: bool
) -> Pin<Box<dyn Future<Output = Result<Frame>> + Send + 'async_trait>> where
Self: Sized,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
#[must_use]fn exec_with_params<'life0, 'life1, 'async_trait>(
&'life0 self,
prepared: &'life1 CBytesShort,
query_parameters: QueryParams
) -> Pin<Box<dyn Future<Output = Result<Frame>> + Send + 'async_trait>> where
Self: Sized,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
prepared: &'life1 CBytesShort,
query_parameters: QueryParams
) -> Pin<Box<dyn Future<Output = Result<Frame>> + Send + 'async_trait>> where
Self: Sized,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
#[must_use]fn exec_with_values_tw<'life0, 'life1, 'async_trait, V: Into<QueryValues> + Sync + Send>(
&'life0 self,
prepared: &'life1 CBytesShort,
values: V,
with_tracing: bool,
with_warnings: bool
) -> Pin<Box<dyn Future<Output = Result<Frame>> + Send + 'async_trait>> where
Self: Sized,
V: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
prepared: &'life1 CBytesShort,
values: V,
with_tracing: bool,
with_warnings: bool
) -> Pin<Box<dyn Future<Output = Result<Frame>> + Send + 'async_trait>> where
Self: Sized,
V: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
#[must_use]fn exec_with_values<'life0, 'life1, 'async_trait, V: Into<QueryValues> + Sync + Send>(
&'life0 self,
prepared: &'life1 CBytesShort,
values: V
) -> Pin<Box<dyn Future<Output = Result<Frame>> + Send + 'async_trait>> where
Self: Sized,
V: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
prepared: &'life1 CBytesShort,
values: V
) -> Pin<Box<dyn Future<Output = Result<Frame>> + Send + 'async_trait>> where
Self: Sized,
V: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
#[must_use]fn exec_tw<'life0, 'life1, 'async_trait>(
&'life0 self,
prepared: &'life1 CBytesShort,
with_tracing: bool,
with_warnings: bool
) -> Pin<Box<dyn Future<Output = Result<Frame>> + Send + 'async_trait>> where
Self: Sized,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
prepared: &'life1 CBytesShort,
with_tracing: bool,
with_warnings: bool
) -> Pin<Box<dyn Future<Output = Result<Frame>> + Send + 'async_trait>> where
Self: Sized,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
#[must_use]fn exec<'life0, 'life1, 'async_trait>(
&'life0 self,
prepared: &'life1 CBytesShort
) -> Pin<Box<dyn Future<Output = Result<Frame>> + Send + 'async_trait>> where
Self: Sized + Sync,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
prepared: &'life1 CBytesShort
) -> Pin<Box<dyn Future<Output = Result<Frame>> + Send + 'async_trait>> where
Self: Sized + Sync,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
impl<'a, LB> GetCompressor<'a> for Session<LB>
[src]
fn get_compressor(&self) -> Compression
[src]
Returns compression that current session has.
impl<T: CDRSTransport + Send + Sync + 'static, M: ManageConnection<Connection = Mutex<T>, Error = Error> + Sized, LB: LoadBalancingStrategy<ConnectionPool<M>> + Sized + Send + Sync> GetConnection<T, M> for Session<LB>
[src]
fn get_connection<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Option<Arc<ConnectionPool<M>>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self
) -> Pin<Box<dyn Future<Output = Option<Arc<ConnectionPool<M>>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
impl<'a, T: CDRSTransport + Unpin + 'static, LB: LoadBalancingStrategy<ConnectionPool<M>> + Sized + Send + Sync, M: ManageConnection<Connection = Mutex<T>, Error = Error> + Sized> PrepareExecutor<T, M> for Session<LB>
[src]
#[must_use]fn prepare_raw_tw<'life0, 'async_trait, Q: ToString + Sync + Send>(
&'life0 self,
query: Q,
with_tracing: bool,
with_warnings: bool
) -> Pin<Box<dyn Future<Output = Result<BodyResResultPrepared>> + Send + 'async_trait>> where
Self: Sized,
Q: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
query: Q,
with_tracing: bool,
with_warnings: bool
) -> Pin<Box<dyn Future<Output = Result<BodyResResultPrepared>> + Send + 'async_trait>> where
Self: Sized,
Q: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
#[must_use]fn prepare_raw<'life0, 'async_trait, Q: ToString + Sync + Send>(
&'life0 self,
query: Q
) -> Pin<Box<dyn Future<Output = Result<BodyResResultPrepared>> + Send + 'async_trait>> where
Self: Sized,
Q: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
query: Q
) -> Pin<Box<dyn Future<Output = Result<BodyResResultPrepared>> + Send + 'async_trait>> where
Self: Sized,
Q: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
#[must_use]fn prepare_tw<'life0, 'async_trait, Q: ToString + Sync + Send>(
&'life0 self,
query: Q,
with_tracing: bool,
with_warnings: bool
) -> Pin<Box<dyn Future<Output = Result<PreparedQuery>> + Send + 'async_trait>> where
Self: Sized,
Q: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
query: Q,
with_tracing: bool,
with_warnings: bool
) -> Pin<Box<dyn Future<Output = Result<PreparedQuery>> + Send + 'async_trait>> where
Self: Sized,
Q: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
#[must_use]fn prepare<'life0, 'async_trait, Q: ToString + Sync + Send>(
&'life0 self,
query: Q
) -> Pin<Box<dyn Future<Output = Result<PreparedQuery>> + Send + 'async_trait>> where
Self: Sized + Sync,
Q: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
query: Q
) -> Pin<Box<dyn Future<Output = Result<PreparedQuery>> + Send + 'async_trait>> where
Self: Sized + Sync,
Q: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
impl<'a, T: CDRSTransport + Unpin + 'static, M: ManageConnection<Connection = Mutex<T>, Error = Error> + Sized, LB: LoadBalancingStrategy<ConnectionPool<M>> + Sized + Send + Sync> QueryExecutor<T, M> for Session<LB>
[src]
#[must_use]fn query_with_params_tw<'life0, 'async_trait, Q: ToString + Send>(
&'life0 self,
query: Q,
query_params: QueryParams,
with_tracing: bool,
with_warnings: bool
) -> Pin<Box<dyn Future<Output = Result<Frame>> + Send + 'async_trait>> where
Self: Sized,
Q: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
query: Q,
query_params: QueryParams,
with_tracing: bool,
with_warnings: bool
) -> Pin<Box<dyn Future<Output = Result<Frame>> + Send + 'async_trait>> where
Self: Sized,
Q: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
#[must_use]fn query<'life0, 'async_trait, Q: ToString + Send>(
&'life0 self,
query: Q
) -> Pin<Box<dyn Future<Output = Result<Frame>> + Send + 'async_trait>> where
Self: Sized,
Q: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
query: Q
) -> Pin<Box<dyn Future<Output = Result<Frame>> + Send + 'async_trait>> where
Self: Sized,
Q: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
#[must_use]fn query_tw<'life0, 'async_trait, Q: ToString + Send>(
&'life0 self,
query: Q,
with_tracing: bool,
with_warnings: bool
) -> Pin<Box<dyn Future<Output = Result<Frame>> + Send + 'async_trait>> where
Self: Sized,
Q: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
query: Q,
with_tracing: bool,
with_warnings: bool
) -> Pin<Box<dyn Future<Output = Result<Frame>> + Send + 'async_trait>> where
Self: Sized,
Q: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
#[must_use]fn query_with_values<'life0, 'async_trait, Q: ToString + Send, V: Into<QueryValues> + Send>(
&'life0 self,
query: Q,
values: V
) -> Pin<Box<dyn Future<Output = Result<Frame>> + Send + 'async_trait>> where
Self: Sized,
Q: 'async_trait,
V: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
query: Q,
values: V
) -> Pin<Box<dyn Future<Output = Result<Frame>> + Send + 'async_trait>> where
Self: Sized,
Q: 'async_trait,
V: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
#[must_use]fn query_with_values_tw<'life0, 'async_trait, Q: ToString + Send, V: Into<QueryValues> + Send>(
&'life0 self,
query: Q,
values: V,
with_tracing: bool,
with_warnings: bool
) -> Pin<Box<dyn Future<Output = Result<Frame>> + Send + 'async_trait>> where
Self: Sized,
Q: 'async_trait,
V: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
query: Q,
values: V,
with_tracing: bool,
with_warnings: bool
) -> Pin<Box<dyn Future<Output = Result<Frame>> + Send + 'async_trait>> where
Self: Sized,
Q: 'async_trait,
V: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
#[must_use]fn query_with_params<'life0, 'async_trait, Q: ToString + Send>(
&'life0 self,
query: Q,
query_params: QueryParams
) -> Pin<Box<dyn Future<Output = Result<Frame>> + Send + 'async_trait>> where
Self: Sized,
Q: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
query: Q,
query_params: QueryParams
) -> Pin<Box<dyn Future<Output = Result<Frame>> + Send + 'async_trait>> where
Self: Sized,
Q: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
impl<LB> ResponseCache for Session<LB> where
LB: Send,
[src]
LB: Send,
Auto Trait Implementations
impl<LB> !RefUnwindSafe for Session<LB>
impl<LB> Send for Session<LB> where
LB: Send,
LB: Send,
impl<LB> Sync for Session<LB> where
LB: Send,
LB: Send,
impl<LB> Unpin for Session<LB> where
LB: Unpin,
LB: Unpin,
impl<LB> !UnwindSafe for Session<LB>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,