pub trait ConnectionCreator: Send + Sync {
// Required method
fn create_connection<'life0, 'life1, 'async_trait>(
&'life0 self,
label: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn Connection + 'static>, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}
Expand description
A creator of a connections for a particular SQLite database.
Required Methods§
Sourcefn create_connection<'life0, 'life1, 'async_trait>(
&'life0 self,
label: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn Connection + 'static>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create_connection<'life0, 'life1, 'async_trait>(
&'life0 self,
label: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn Connection + 'static>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get a new Connection
The connection should be a new connection, not a reused one.