pub struct Database { /* private fields */ }Implementations§
Source§impl Database
impl Database
Sourcepub fn open<P: AsRef<Path>>(db_path: P, mode: Mode) -> Result<Self>
pub fn open<P: AsRef<Path>>(db_path: P, mode: Mode) -> Result<Self>
Opens a database at the specified path.
If db_path is empty or “:memory:”, the database is opened in memory.
Sourcepub fn with_options(options: DatabaseOptions) -> Result<Self>
pub fn with_options(options: DatabaseOptions) -> Result<Self>
Opens a database with full options.
Sourcepub fn connect(&self) -> Result<Connection>
pub fn connect(&self) -> Result<Connection>
Creates a new connection to the database.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Database
impl RefUnwindSafe for Database
impl Send for Database
impl Sync for Database
impl Unpin for Database
impl UnsafeUnpin 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