pub struct Db { /* private fields */ }Implementations§
Source§impl Db
impl Db
pub async fn open(options: Options) -> Result<Self, Error>
pub async fn attach(options: Options) -> Result<Self, Error>
pub async fn migrate(&self, migrations: Vec<Migration>) -> Result<(), Error>
pub async fn write<T, E, F>( &self, options: WriteOptions, apply: F, ) -> Result<T, WriteError<E>>
pub async fn read<T, E, F>(&self, read: F) -> Result<T, E>
pub async fn close(&self) -> Result<(), Error>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Db
impl Forget for Db
impl Move for Db
impl RefUnwindSafe for Dbwhere
Atomic<usize>: RefUnwindSafe,
Mutex<State>: RefUnwindSafe,
Atomic<bool>: RefUnwindSafe,
Mutex<Option<Instant>>: RefUnwindSafe,
Mutex<Slot>: RefUnwindSafe,
Mutex<Waitlist>: RefUnwindSafe,
AtomicUsize: RefUnwindSafe,
Mutex<Pool>: RefUnwindSafe,
Mutex<Option<File>>: RefUnwindSafe,
Mutex<Option<Background>>: RefUnwindSafe,
impl Send for Db
impl Sync for Db
impl Unpin for Db
impl UnsafeUnpin for Dbwhere
*const ArcInner<Inner> is !null: UnsafeUnpin,
PhantomData<ArcInner<Inner>>: UnsafeUnpin,
Align4<u32>: UnsafeUnpin,
Align1<u8>: UnsafeUnpin,
*const ArcInner<Notify> is !null: UnsafeUnpin,
PhantomData<ArcInner<Notify>>: UnsafeUnpin,
*const Header is !null: UnsafeUnpin,
PhantomData<()>: UnsafeUnpin,
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