Skip to main content

Client

Trait Client 

Source
pub trait Client:
    Send
    + Sync
    + 'static {
    // Required methods
    fn build_client<'life0, 'async_trait>(
        address: &'life0 str,
    ) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>>
       where Self: Sized + 'async_trait,
             'life0: 'async_trait;
    fn execute<'life0, 'async_trait>(
        &'life0 mut self,
        statement: String,
        params: Vec<ParameterValue>,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn query<'life0, 'async_trait>(
        &'life0 mut self,
        statement: String,
        params: Vec<ParameterValue>,
        max_result_bytes: usize,
    ) -> Pin<Box<dyn Future<Output = Result<RowSet, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn query_async<'async_trait>(
        client: Arc<Mutex<Self>>,
        statement: String,
        params: Vec<ParameterValue>,
        max_result_bytes: usize,
    ) -> Pin<Box<dyn Future<Output = Result<(Vec<Column>, Receiver<Row>, Receiver<Result<(), Error>>), Error>> + Send + 'async_trait>>
       where Self: 'async_trait;
}

Required Methods§

Source

fn build_client<'life0, 'async_trait>( address: &'life0 str, ) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>>
where Self: Sized + 'async_trait, 'life0: 'async_trait,

Source

fn execute<'life0, 'async_trait>( &'life0 mut self, statement: String, params: Vec<ParameterValue>, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn query<'life0, 'async_trait>( &'life0 mut self, statement: String, params: Vec<ParameterValue>, max_result_bytes: usize, ) -> Pin<Box<dyn Future<Output = Result<RowSet, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn query_async<'async_trait>( client: Arc<Mutex<Self>>, statement: String, params: Vec<ParameterValue>, max_result_bytes: usize, ) -> Pin<Box<dyn Future<Output = Result<(Vec<Column>, Receiver<Row>, Receiver<Result<(), Error>>), Error>> + Send + 'async_trait>>
where Self: 'async_trait,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Client for Conn

Source§

fn build_client<'life0, 'async_trait>( address: &'life0 str, ) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>>
where Self: Sized + 'async_trait, 'life0: 'async_trait,

Source§

fn execute<'life0, 'async_trait>( &'life0 mut self, statement: String, params: Vec<ParameterValue>, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn query<'life0, 'async_trait>( &'life0 mut self, statement: String, params: Vec<ParameterValue>, max_result_bytes: usize, ) -> Pin<Box<dyn Future<Output = Result<RowSet, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn query_async<'async_trait>( client: Arc<Mutex<Self>>, statement: String, params: Vec<ParameterValue>, max_result_bytes: usize, ) -> Pin<Box<dyn Future<Output = Result<(Vec<Column>, Receiver<Row>, Receiver<Result<(), Error>>), Error>> + Send + 'async_trait>>
where Self: 'async_trait,

Implementors§