pub trait IndexedDBApi: Send {
type ObjectStore: ObjectStoreApi;
type Transaction: TransactionApi;
// Required methods
fn create_object_store<'life0, 'life1, 'async_trait>(
&'life0 mut self,
name: &'life1 str,
schema: ObjectStoreSchema,
) -> Pin<Box<dyn Future<Output = Result<Self::ObjectStore, IndexedDBError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn delete_object_store<'life0, 'life1, 'async_trait>(
&'life0 mut self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), IndexedDBError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn object_store(&self, name: &str) -> Self::ObjectStore;
fn transaction<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
stores: &'life1 [&'life2 str],
mode: TransactionMode,
options: TransactionOptions,
) -> Pin<Box<dyn Future<Output = Result<Self::Transaction, IndexedDBError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}Expand description
Fakeable client contract for IndexedDB-compatible storage.
Required Associated Types§
Sourcetype ObjectStore: ObjectStoreApi
type ObjectStore: ObjectStoreApi
The store handle this scope yields.
Sourcetype Transaction: TransactionApi
type Transaction: TransactionApi
The transaction handle this database yields.
Required Methods§
Sourcefn create_object_store<'life0, 'life1, 'async_trait>(
&'life0 mut self,
name: &'life1 str,
schema: ObjectStoreSchema,
) -> Pin<Box<dyn Future<Output = Result<Self::ObjectStore, IndexedDBError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create_object_store<'life0, 'life1, 'async_trait>(
&'life0 mut self,
name: &'life1 str,
schema: ObjectStoreSchema,
) -> Pin<Box<dyn Future<Output = Result<Self::ObjectStore, IndexedDBError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Creates a named object store and returns a typed handle for it.
Sourcefn delete_object_store<'life0, 'life1, 'async_trait>(
&'life0 mut self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), IndexedDBError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_object_store<'life0, 'life1, 'async_trait>(
&'life0 mut self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), IndexedDBError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Deletes a named object store.
Sourcefn object_store(&self, name: &str) -> Self::ObjectStore
fn object_store(&self, name: &str) -> Self::ObjectStore
Returns a typed handle for one object store.
Sourcefn transaction<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
stores: &'life1 [&'life2 str],
mode: TransactionMode,
options: TransactionOptions,
) -> Pin<Box<dyn Future<Output = Result<Self::Transaction, IndexedDBError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn transaction<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
stores: &'life1 [&'life2 str],
mode: TransactionMode,
options: TransactionOptions,
) -> Pin<Box<dyn Future<Output = Result<Self::Transaction, IndexedDBError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Opens an explicit transaction over a fixed object-store scope.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".