Struct r2d2_sqlite::SqliteConnectionManager [−][src]
pub struct SqliteConnectionManager(_);
An r2d2::ManageConnection
for rusqlite::Connection
s.
Methods
impl SqliteConnectionManager
[src]
impl SqliteConnectionManager
pub fn file<P: AsRef<Path>>(path: P) -> Self
[src]
pub fn file<P: AsRef<Path>>(path: P) -> Self
Creates a new SqliteConnectionManager
from file.
See rusqlite::Connection::open
pub fn memory() -> Self
[src]
pub fn memory() -> Self
Creates a new SqliteConnectionManager
from memory.
Trait Implementations
impl Debug for SqliteConnectionManager
[src]
impl Debug for SqliteConnectionManager
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl ManageConnection for SqliteConnectionManager
[src]
impl ManageConnection for SqliteConnectionManager
type Connection = Connection
The connection type this manager deals with.
type Error = Error
The error type returned by Connection
s.
fn connect(&self) -> Result<Connection, Error>
[src]
fn connect(&self) -> Result<Connection, Error>
Attempts to create a new connection.
fn is_valid(&self, conn: &mut Connection) -> Result<(), Error>
[src]
fn is_valid(&self, conn: &mut Connection) -> Result<(), Error>
Determines if the connection is still connected to the database. Read more
fn has_broken(&self, _: &mut Connection) -> bool
[src]
fn has_broken(&self, _: &mut Connection) -> bool
Quickly determines if the connection is no longer usable. Read more
Auto Trait Implementations
impl Send for SqliteConnectionManager
impl Send for SqliteConnectionManager
impl Sync for SqliteConnectionManager
impl Sync for SqliteConnectionManager