Struct deadpool_sqlite::ConnectionWrapper [−][src]
pub struct ConnectionWrapper { /* fields omitted */ }Expand description
A wrapper for rusqlite::Connection which provides indirect
access to it via the interact function.
Implementations
impl ConnectionWrapper[src]
impl ConnectionWrapper[src]pub async fn interact<F, R>(&self, f: F) -> R where
F: FnOnce(&Connection) -> R + Send + 'static,
R: Send + 'static, [src]
pub async fn interact<F, R>(&self, f: F) -> R where
F: FnOnce(&Connection) -> R + Send + 'static,
R: Send + 'static, [src]Interact with the underlying SQLite connection. This function expects a closure that takes the connection as parameter. The closure is executed in a separate thread so that the async runtime is not blocked.