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

The file returned by Vfs::open.

Required Methods

Open the database db (of type opts.kind).

Delete the database db.

Check if a database db already exists.

Generate and return a path for a temporary database.

Populate the buffer with random data.

Sleep for duration. Return the duration actually slept.

Provided Methods

Check access to db. The default implementation always returns true.

Retrieve the full pathname of a database db.

Implementors