pub struct Db { /* private fields */ }
Implementations§
source§impl Db
impl Db
pub fn new(filename: &str) -> Result<Db, DbError>
pub fn exec<T: Query>(&self, query: &T) -> Result<QueryResult, QueryError>
pub fn exec_mut<T: QueryMut>( &mut self, query: &T ) -> Result<QueryResult, QueryError>
pub fn transaction<T, E>( &self, f: impl Fn(&Transaction<'_>) -> Result<T, E> ) -> Result<T, E>
pub fn transaction_mut<T, E: From<QueryError>>( &mut self, f: impl Fn(&mut TransactionMut<'_>) -> Result<T, E> ) -> Result<T, E>
Trait Implementations§
Auto Trait Implementations§
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