pub struct Db { /* private fields */ }
Expand description
This might contain a database or none.
This will be usefull to mocking the database with a memory database.
Implementations§
Source§impl Db
impl Db
pub fn new_memory() -> Self
pub async fn get(&self) -> Result<ConnOwned, DatabaseError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Db
impl !RefUnwindSafe for Db
impl Send for Db
impl Sync for Db
impl Unpin for Db
impl !UnwindSafe for Db
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