pub struct SqliteDriver { /* private fields */ }Expand description
SQLite driver for durable local storage.
Implementations§
Source§impl SqliteDriver
impl SqliteDriver
Sourcepub fn with_options(options: SqliteDriverOptions) -> Self
pub fn with_options(options: SqliteDriverOptions) -> Self
Creates a new SQLite driver with explicit options.
Sourcepub const fn options(&self) -> &SqliteDriverOptions
pub const fn options(&self) -> &SqliteDriverOptions
Returns the configured options.
Sourcepub const fn schema(&self) -> SqliteStorageSchema
pub const fn schema(&self) -> SqliteStorageSchema
Returns the SQLite storage schema description.
Trait Implementations§
Source§impl Clone for SqliteDriver
impl Clone for SqliteDriver
Source§impl Debug for SqliteDriver
impl Debug for SqliteDriver
Source§impl Driver for SqliteDriver
impl Driver for SqliteDriver
Source§fn capabilities(&self) -> Capabilities
fn capabilities(&self) -> Capabilities
Reports supported driver behaviour.
Source§fn initialise<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn initialise<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Prepares the driver for use.
Source§fn finalise<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn finalise<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Releases driver resources.
Source§fn get<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
namespace: &'life1 Namespace,
collection: &'life2 CollectionName,
key: &'life3 Key,
options: &'life4 ReadOptions,
) -> Pin<Box<dyn Future<Output = Result<Option<StoredValue>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn get<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
namespace: &'life1 Namespace,
collection: &'life2 CollectionName,
key: &'life3 Key,
options: &'life4 ReadOptions,
) -> Pin<Box<dyn Future<Output = Result<Option<StoredValue>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Reads a stored value.
Source§fn set<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
namespace: &'life1 Namespace,
collection: &'life2 CollectionName,
key: &'life3 Key,
value: StoredValue,
options: &'life4 WriteOptions,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn set<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
namespace: &'life1 Namespace,
collection: &'life2 CollectionName,
key: &'life3 Key,
value: StoredValue,
options: &'life4 WriteOptions,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Writes a stored value.
Source§fn delete<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
namespace: &'life1 Namespace,
collection: &'life2 CollectionName,
key: &'life3 Key,
options: &'life4 DeleteOptions,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn delete<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
namespace: &'life1 Namespace,
collection: &'life2 CollectionName,
key: &'life3 Key,
options: &'life4 DeleteOptions,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Deletes a stored value and returns whether a value was removed.
Source§fn exists<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
namespace: &'life1 Namespace,
collection: &'life2 CollectionName,
key: &'life3 Key,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn exists<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
namespace: &'life1 Namespace,
collection: &'life2 CollectionName,
key: &'life3 Key,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Returns whether a stored value exists.
Source§fn scan_prefix<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
namespace: &'life1 Namespace,
collection: &'life2 CollectionName,
options: &'life3 ScanOptions,
) -> Pin<Box<dyn Future<Output = Result<Vec<(Key, StoredValue)>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn scan_prefix<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
namespace: &'life1 Namespace,
collection: &'life2 CollectionName,
options: &'life3 ScanOptions,
) -> Pin<Box<dyn Future<Output = Result<Vec<(Key, StoredValue)>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Scans values by key prefix.
Auto Trait Implementations§
impl !Freeze for SqliteDriver
impl !RefUnwindSafe for SqliteDriver
impl !UnwindSafe for SqliteDriver
impl Send for SqliteDriver
impl Sync for SqliteDriver
impl Unpin for SqliteDriver
impl UnsafeUnpin for SqliteDriver
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