pub struct Connection { /* private fields */ }Trait Implementations§
Source§impl DatabaseHandle for Connection
impl DatabaseHandle for Connection
Source§type WalIndex = WalDisabled
type WalIndex = WalDisabled
An optional trait used to store a WAL (write-ahead log).
Source§fn read_exact_at(&mut self, buf: &mut [u8], offset: u64) -> Result<(), Error>
fn read_exact_at(&mut self, buf: &mut [u8], offset: u64) -> Result<(), Error>
Reads the exact number of byte required to fill
buf from the given offset.Source§fn write_all_at(&mut self, buf: &[u8], offset: u64) -> Result<(), Error>
fn write_all_at(&mut self, buf: &[u8], offset: u64) -> Result<(), Error>
Attempts to write an entire
buf starting from the given offset.Source§fn sync(&mut self, _data_only: bool) -> Result<(), Error>
fn sync(&mut self, _data_only: bool) -> Result<(), Error>
Make sure all writes are committed to the underlying storage. If
data_only is set to
true, only the data and not the metadata (like size, access time, etc) should be synced.Source§fn set_len(&mut self, size: u64) -> Result<(), Error>
fn set_len(&mut self, size: u64) -> Result<(), Error>
Set the database file to the specified
size. Truncates or extends the underlying storage.Source§fn lock(&mut self, lock: LockKind) -> Result<bool, Error>
fn lock(&mut self, lock: LockKind) -> Result<bool, Error>
Lock the database. Returns whether the requested lock could be acquired.
Locking sequence: Read more
Source§fn reserved(&mut self) -> Result<bool, Error>
fn reserved(&mut self) -> Result<bool, Error>
Check if the database this handle points to holds a LockKind::Reserved,
LockKind::Pending or LockKind::Exclusive lock.
Source§fn current_lock(&self) -> Result<LockKind, Error>
fn current_lock(&self) -> Result<LockKind, Error>
Return the current LockKind of the this handle.
fn wal_index(&self, _readonly: bool) -> Result<Self::WalIndex, Error>
Source§impl Drop for Connection
impl Drop for Connection
Auto Trait Implementations§
impl Freeze for Connection
impl RefUnwindSafe for Connection
impl Send for Connection
impl Sync for Connection
impl Unpin for Connection
impl UnsafeUnpin for Connection
impl UnwindSafe for Connection
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