pub struct Database;Expand description
Defines a database
Implementationsยง
sourceยงimpl Database
impl Database
sourcepub async fn connect<C>(opt: C) -> Result<DatabaseConnection, DbErr>where
C: Into<ConnectOptions>,
pub async fn connect<C>(opt: C) -> Result<DatabaseConnection, DbErr>where
C: Into<ConnectOptions>,
Method to create a DatabaseConnection on a database
sourcepub async fn connect_proxy(
db_type: DbBackend,
proxy_func_arc: Arc<Mutex<Box<dyn ProxyDatabaseTrait>>>
) -> Result<DatabaseConnection, DbErr>
pub async fn connect_proxy( db_type: DbBackend, proxy_func_arc: Arc<Mutex<Box<dyn ProxyDatabaseTrait>>> ) -> Result<DatabaseConnection, DbErr>
Method to create a DatabaseConnection on a proxy database
Trait Implementationsยง
Auto Trait Implementationsยง
impl RefUnwindSafe for Database
impl Send for Database
impl Sync for Database
impl Unpin for Database
impl UnwindSafe for Database
Blanket Implementationsยง
sourceยงimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
sourceยงfn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more