pub trait StoreControl<S> {
// Required methods
fn add_file(vfs: *mut sqlite3_vfs, file: &str, flags: i32);
fn contains_file(vfs: *mut sqlite3_vfs, file: &str) -> bool;
fn delete_file(vfs: *mut sqlite3_vfs, file: &str) -> Option<S>;
fn with_file<F: Fn(&S) -> i32>(
vfs_file: &SQLiteVfsFile,
f: F,
) -> Option<i32>;
fn with_file_mut<F: Fn(&mut S) -> i32>(
vfs_file: &SQLiteVfsFile,
f: F,
) -> Option<i32>;
}
Expand description
Control the Store and make changes to files
Required Methods§
Sourcefn add_file(vfs: *mut sqlite3_vfs, file: &str, flags: i32)
fn add_file(vfs: *mut sqlite3_vfs, file: &str, flags: i32)
Adding files to the Store, use for xOpen
Sourcefn contains_file(vfs: *mut sqlite3_vfs, file: &str) -> bool
fn contains_file(vfs: *mut sqlite3_vfs, file: &str) -> bool
Checks if the specified file exists in the Store, use for xOpen
Sourcefn delete_file(vfs: *mut sqlite3_vfs, file: &str) -> Option<S>
fn delete_file(vfs: *mut sqlite3_vfs, file: &str) -> Option<S>
Delete the specified file in the Store, use for xClose
and xDelete
Sourcefn with_file<F: Fn(&S) -> i32>(vfs_file: &SQLiteVfsFile, f: F) -> Option<i32>
fn with_file<F: Fn(&S) -> i32>(vfs_file: &SQLiteVfsFile, f: F) -> Option<i32>
Read the file contents, use for xRead
, xFileSize
Sourcefn with_file_mut<F: Fn(&mut S) -> i32>(
vfs_file: &SQLiteVfsFile,
f: F,
) -> Option<i32>
fn with_file_mut<F: Fn(&mut S) -> i32>( vfs_file: &SQLiteVfsFile, f: F, ) -> Option<i32>
Write the file contents, use for xWrite
, xTruncate
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.