pub trait BackendConnection: ConnectionMethods + Debug + Send + 'static {
    // Required methods
    fn transaction(&mut self) -> Result<Transaction<'_>, Error>;
    fn backend(&self) -> Box<dyn Backend + 'static, Global>;
    fn backend_name(&self) -> &'static str;
    fn is_closed(&self) -> bool;
}
Expand description

Database connection.

Required Methods§

source

fn transaction(&mut self) -> Result<Transaction<'_>, Error>

Begin a database transaction. The transaction object must be used in place of this connection until it is committed and aborted.

source

fn backend(&self) -> Box<dyn Backend + 'static, Global>

Retrieve the backend backend this connection

source

fn backend_name(&self) -> &'static str

source

fn is_closed(&self) -> bool

Tests if the connection has been closed. Backends which do not support this check should return false.

Implementors§