Trait AsyncTransaction

Source
pub trait AsyncTransaction {
    type Error: Error + Send + Sync + 'static;

    // Required method
    fn execute<'a, 'life0, 'async_trait, T>(
        &'life0 mut self,
        queries: T,
    ) -> Pin<Box<dyn Future<Output = Result<usize, Self::Error>> + Send + 'async_trait>>
       where T: 'async_trait + Iterator<Item = &'a str> + Send,
             Self: 'async_trait,
             'a: 'async_trait,
             'life0: 'async_trait;
}

Required Associated Types§

Source

type Error: Error + Send + Sync + 'static

Required Methods§

Source

fn execute<'a, 'life0, 'async_trait, T>( &'life0 mut self, queries: T, ) -> Pin<Box<dyn Future<Output = Result<usize, Self::Error>> + Send + 'async_trait>>
where T: 'async_trait + Iterator<Item = &'a str> + Send, Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait,

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.

Implementations on Foreign Types§

Source§

impl AsyncTransaction for Pool

Source§

type Error = Error

Source§

fn execute<'a, 'life0, 'async_trait, T>( &'life0 mut self, queries: T, ) -> Pin<Box<dyn Future<Output = Result<usize, Self::Error>> + Send + 'async_trait>>
where T: 'async_trait + Iterator<Item = &'a str> + Send, Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait,

Source§

impl AsyncTransaction for Client

Source§

type Error = Error

Source§

fn execute<'a, 'life0, 'async_trait, T>( &'life0 mut self, queries: T, ) -> Pin<Box<dyn Future<Output = Result<usize, Self::Error>> + Send + 'async_trait>>
where T: 'async_trait + Iterator<Item = &'a str> + Send, Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait,

Source§

impl<S> AsyncTransaction for Client<S>
where S: AsyncRead + AsyncWrite + Unpin + Send,

Source§

type Error = Error

Source§

fn execute<'a, 'life0, 'async_trait, T>( &'life0 mut self, queries: T, ) -> Pin<Box<dyn Future<Output = Result<usize, Self::Error>> + Send + 'async_trait>>
where T: 'async_trait + Iterator<Item = &'a str> + Send, Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait,

Implementors§