sqlx_rqlite/connection/
establish.rs

1use super::*;
2
3impl RqliteConnection {
4    pub async fn establish(
5        options: &RqliteConnectOptions,
6    ) -> Result<Self, sqlx_core::error::Error> {
7        let res = options.inner.connect().await;
8        match res {
9            Ok(conn) => Ok(Self { inner: conn }),
10            Err(err) => Err(Error::Io(std::io::Error::new(
11                std::io::ErrorKind::Other,
12                format!("{}", err).as_str(),
13            ))),
14        }
15    }
16}