Struct ic_sqlite_features::vfs::Connection
source · 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>
Auto Trait Implementations§
impl Freeze for Connection
impl RefUnwindSafe for Connection
impl Send for Connection
impl Sync for Connection
impl Unpin 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