Trait madsim_tokio_postgres::GenericClient 
source · [−]pub trait GenericClient: Sealed {
    fn execute<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
        &'life0 self,
        query: &'life1 T,
        params: &'life2 [&'life3 (dyn ToSql + Sync)]
    ) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>
    where
        T: ?Sized + ToStatement + Sync + Send,
        T: 'async_trait,
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        'life3: 'async_trait,
        Self: 'async_trait;
    fn execute_raw<'life0, 'life1, 'async_trait, P, I, T>(
        &'life0 self,
        statement: &'life1 T,
        params: I
    ) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>
    where
        T: ?Sized + ToStatement + Sync + Send,
        P: BorrowToSql,
        I: IntoIterator<Item = P> + Sync + Send,
        I::IntoIter: ExactSizeIterator,
        P: 'async_trait,
        I: 'async_trait,
        T: 'async_trait,
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait;
    fn query<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
        &'life0 self,
        query: &'life1 T,
        params: &'life2 [&'life3 (dyn ToSql + Sync)]
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Row>, Error>> + Send + 'async_trait>>
    where
        T: ?Sized + ToStatement + Sync + Send,
        T: 'async_trait,
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        'life3: 'async_trait,
        Self: 'async_trait;
    fn query_one<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
        &'life0 self,
        statement: &'life1 T,
        params: &'life2 [&'life3 (dyn ToSql + Sync)]
    ) -> Pin<Box<dyn Future<Output = Result<Row, Error>> + Send + 'async_trait>>
    where
        T: ?Sized + ToStatement + Sync + Send,
        T: 'async_trait,
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        'life3: 'async_trait,
        Self: 'async_trait;
    fn query_opt<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
        &'life0 self,
        statement: &'life1 T,
        params: &'life2 [&'life3 (dyn ToSql + Sync)]
    ) -> Pin<Box<dyn Future<Output = Result<Option<Row>, Error>> + Send + 'async_trait>>
    where
        T: ?Sized + ToStatement + Sync + Send,
        T: 'async_trait,
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        'life3: 'async_trait,
        Self: 'async_trait;
    fn query_raw<'life0, 'life1, 'async_trait, T, P, I>(
        &'life0 self,
        statement: &'life1 T,
        params: I
    ) -> Pin<Box<dyn Future<Output = Result<RowStream, Error>> + Send + 'async_trait>>
    where
        T: ?Sized + ToStatement + Sync + Send,
        P: BorrowToSql,
        I: IntoIterator<Item = P> + Sync + Send,
        I::IntoIter: ExactSizeIterator,
        T: 'async_trait,
        P: 'async_trait,
        I: 'async_trait,
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait;
    fn prepare<'life0, 'life1, 'async_trait>(
        &'life0 self,
        query: &'life1 str
    ) -> Pin<Box<dyn Future<Output = Result<Statement, Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait;
    fn prepare_typed<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        query: &'life1 str,
        parameter_types: &'life2 [Type]
    ) -> Pin<Box<dyn Future<Output = Result<Statement, Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        Self: 'async_trait;
    fn transaction<'life0, 'async_trait>(
        &'life0 mut self
    ) -> Pin<Box<dyn Future<Output = Result<Transaction<'_>, Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait;
    fn client(&self) -> &Client;
}Expand description
A trait allowing abstraction over connections and transactions.
This trait is “sealed”, and cannot be implemented outside of this crate.
Required Methods
fn execute<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
    &'life0 self,
    query: &'life1 T,
    params: &'life2 [&'life3 (dyn ToSql + Sync)]
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>> where
    T: ?Sized + ToStatement + Sync + Send,
    T: 'async_trait,
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    'life3: 'async_trait,
    Self: 'async_trait, 
fn execute<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
    &'life0 self,
    query: &'life1 T,
    params: &'life2 [&'life3 (dyn ToSql + Sync)]
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>> where
    T: ?Sized + ToStatement + Sync + Send,
    T: 'async_trait,
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    'life3: 'async_trait,
    Self: 'async_trait, 
Like Client::execute.
fn execute_raw<'life0, 'life1, 'async_trait, P, I, T>(
    &'life0 self,
    statement: &'life1 T,
    params: I
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>> where
    T: ?Sized + ToStatement + Sync + Send,
    P: BorrowToSql,
    I: IntoIterator<Item = P> + Sync + Send,
    I::IntoIter: ExactSizeIterator,
    P: 'async_trait,
    I: 'async_trait,
    T: 'async_trait,
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
fn execute_raw<'life0, 'life1, 'async_trait, P, I, T>(
    &'life0 self,
    statement: &'life1 T,
    params: I
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>> where
    T: ?Sized + ToStatement + Sync + Send,
    P: BorrowToSql,
    I: IntoIterator<Item = P> + Sync + Send,
    I::IntoIter: ExactSizeIterator,
    P: 'async_trait,
    I: 'async_trait,
    T: 'async_trait,
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
Like Client::execute_raw.
fn query<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
    &'life0 self,
    query: &'life1 T,
    params: &'life2 [&'life3 (dyn ToSql + Sync)]
) -> Pin<Box<dyn Future<Output = Result<Vec<Row>, Error>> + Send + 'async_trait>> where
    T: ?Sized + ToStatement + Sync + Send,
    T: 'async_trait,
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    'life3: 'async_trait,
    Self: 'async_trait, 
fn query<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
    &'life0 self,
    query: &'life1 T,
    params: &'life2 [&'life3 (dyn ToSql + Sync)]
) -> Pin<Box<dyn Future<Output = Result<Vec<Row>, Error>> + Send + 'async_trait>> where
    T: ?Sized + ToStatement + Sync + Send,
    T: 'async_trait,
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    'life3: 'async_trait,
    Self: 'async_trait, 
Like Client::query.
fn query_one<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
    &'life0 self,
    statement: &'life1 T,
    params: &'life2 [&'life3 (dyn ToSql + Sync)]
) -> Pin<Box<dyn Future<Output = Result<Row, Error>> + Send + 'async_trait>> where
    T: ?Sized + ToStatement + Sync + Send,
    T: 'async_trait,
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    'life3: 'async_trait,
    Self: 'async_trait, 
fn query_one<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
    &'life0 self,
    statement: &'life1 T,
    params: &'life2 [&'life3 (dyn ToSql + Sync)]
) -> Pin<Box<dyn Future<Output = Result<Row, Error>> + Send + 'async_trait>> where
    T: ?Sized + ToStatement + Sync + Send,
    T: 'async_trait,
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    'life3: 'async_trait,
    Self: 'async_trait, 
Like Client::query_one.
fn query_opt<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
    &'life0 self,
    statement: &'life1 T,
    params: &'life2 [&'life3 (dyn ToSql + Sync)]
) -> Pin<Box<dyn Future<Output = Result<Option<Row>, Error>> + Send + 'async_trait>> where
    T: ?Sized + ToStatement + Sync + Send,
    T: 'async_trait,
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    'life3: 'async_trait,
    Self: 'async_trait, 
fn query_opt<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
    &'life0 self,
    statement: &'life1 T,
    params: &'life2 [&'life3 (dyn ToSql + Sync)]
) -> Pin<Box<dyn Future<Output = Result<Option<Row>, Error>> + Send + 'async_trait>> where
    T: ?Sized + ToStatement + Sync + Send,
    T: 'async_trait,
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    'life3: 'async_trait,
    Self: 'async_trait, 
Like Client::query_opt.
fn query_raw<'life0, 'life1, 'async_trait, T, P, I>(
    &'life0 self,
    statement: &'life1 T,
    params: I
) -> Pin<Box<dyn Future<Output = Result<RowStream, Error>> + Send + 'async_trait>> where
    T: ?Sized + ToStatement + Sync + Send,
    P: BorrowToSql,
    I: IntoIterator<Item = P> + Sync + Send,
    I::IntoIter: ExactSizeIterator,
    T: 'async_trait,
    P: 'async_trait,
    I: 'async_trait,
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
fn query_raw<'life0, 'life1, 'async_trait, T, P, I>(
    &'life0 self,
    statement: &'life1 T,
    params: I
) -> Pin<Box<dyn Future<Output = Result<RowStream, Error>> + Send + 'async_trait>> where
    T: ?Sized + ToStatement + Sync + Send,
    P: BorrowToSql,
    I: IntoIterator<Item = P> + Sync + Send,
    I::IntoIter: ExactSizeIterator,
    T: 'async_trait,
    P: 'async_trait,
    I: 'async_trait,
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
Like Client::query_raw.
Like Client::prepare.
Like Client::prepare_typed.
fn transaction<'life0, 'async_trait>(
    &'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<Transaction<'_>, Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
fn transaction<'life0, 'async_trait>(
    &'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<Transaction<'_>, Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
Like Client::transaction.