Trait sqlite_vfs::Vfs
source · [−]pub trait Vfs: Sync {
type Handle: DatabaseHandle;
fn open(&self, db: &str, opts: OpenOptions) -> Result<Self::Handle, Error>;
fn delete(&self, db: &str) -> Result<(), Error>;
fn exists(&self, db: &str) -> Result<bool, Error>;
fn temporary_name(&self) -> String;
fn random(&self, buffer: &mut [i8]);
fn sleep(&self, duration: Duration) -> Duration;
fn access(&self, _db: &str, _write: bool) -> Result<bool, Error> { ... }
fn full_pathname<'a>(&self, db: &'a str) -> Result<Cow<'a, str>, Error> { ... }
}
Expand description
A virtual file system for SQLite.
Required Associated Types
type Handle: DatabaseHandle
type Handle: DatabaseHandle
The file returned by Vfs::open.
Required Methods
Open the database db
(of type opts.kind
).
fn temporary_name(&self) -> String
fn temporary_name(&self) -> String
Generate and return a path for a temporary database.
Provided Methods
Check access to db
. The default implementation always returns true
.