pub trait TransactionObjectStoreApi: Send {
type Index<'a>: TransactionIndexApi + 'a
where Self: 'a;
// Required methods
fn get<'life0, 'life1, 'async_trait>(
&'life0 mut self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Record, IndexedDBError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_key<'life0, 'life1, 'async_trait>(
&'life0 mut self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<String, IndexedDBError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn add<'life0, 'async_trait>(
&'life0 mut self,
record: Record,
) -> Pin<Box<dyn Future<Output = Result<(), IndexedDBError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn put<'life0, 'async_trait>(
&'life0 mut self,
record: Record,
) -> Pin<Box<dyn Future<Output = Result<(), IndexedDBError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn delete<'life0, 'life1, 'async_trait>(
&'life0 mut self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), IndexedDBError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn clear<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), IndexedDBError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_all<'life0, 'async_trait>(
&'life0 mut self,
range: Option<KeyRange>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Record>, IndexedDBError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_all_keys<'life0, 'async_trait>(
&'life0 mut self,
range: Option<KeyRange>,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, IndexedDBError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn count<'life0, 'async_trait>(
&'life0 mut self,
range: Option<KeyRange>,
) -> Pin<Box<dyn Future<Output = Result<i64, IndexedDBError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn delete_range<'life0, 'async_trait>(
&'life0 mut self,
range: KeyRange,
) -> Pin<Box<dyn Future<Output = Result<i64, IndexedDBError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn index<'a>(&'a mut self, name: &str) -> Self::Index<'a>;
}Expand description
Fakeable transaction-scoped object-store contract.
Required Associated Types§
Sourcetype Index<'a>: TransactionIndexApi + 'a
where
Self: 'a
type Index<'a>: TransactionIndexApi + 'a where Self: 'a
The transaction-scoped index handle.
Required Methods§
Sourcefn get<'life0, 'life1, 'async_trait>(
&'life0 mut self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Record, IndexedDBError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get<'life0, 'life1, 'async_trait>(
&'life0 mut self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Record, IndexedDBError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Loads one record by primary key inside the transaction.
Sourcefn get_key<'life0, 'life1, 'async_trait>(
&'life0 mut self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<String, IndexedDBError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_key<'life0, 'life1, 'async_trait>(
&'life0 mut self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<String, IndexedDBError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Resolves the primary key for id inside the transaction.
Sourcefn add<'life0, 'async_trait>(
&'life0 mut self,
record: Record,
) -> Pin<Box<dyn Future<Output = Result<(), IndexedDBError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn add<'life0, 'async_trait>(
&'life0 mut self,
record: Record,
) -> Pin<Box<dyn Future<Output = Result<(), IndexedDBError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Inserts a new row inside the transaction.
Sourcefn put<'life0, 'async_trait>(
&'life0 mut self,
record: Record,
) -> Pin<Box<dyn Future<Output = Result<(), IndexedDBError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn put<'life0, 'async_trait>(
&'life0 mut self,
record: Record,
) -> Pin<Box<dyn Future<Output = Result<(), IndexedDBError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Upserts a row inside the transaction.
Sourcefn delete<'life0, 'life1, 'async_trait>(
&'life0 mut self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), IndexedDBError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete<'life0, 'life1, 'async_trait>(
&'life0 mut self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), IndexedDBError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Deletes one row inside the transaction.
Sourcefn clear<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), IndexedDBError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn clear<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), IndexedDBError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Deletes every row in the object store inside the transaction.
Sourcefn get_all<'life0, 'async_trait>(
&'life0 mut self,
range: Option<KeyRange>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Record>, IndexedDBError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_all<'life0, 'async_trait>(
&'life0 mut self,
range: Option<KeyRange>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Record>, IndexedDBError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Loads every row that matches range inside the transaction.
Sourcefn get_all_keys<'life0, 'async_trait>(
&'life0 mut self,
range: Option<KeyRange>,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, IndexedDBError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_all_keys<'life0, 'async_trait>(
&'life0 mut self,
range: Option<KeyRange>,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, IndexedDBError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Loads every primary key that matches range inside the transaction.
Sourcefn count<'life0, 'async_trait>(
&'life0 mut self,
range: Option<KeyRange>,
) -> Pin<Box<dyn Future<Output = Result<i64, IndexedDBError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn count<'life0, 'async_trait>(
&'life0 mut self,
range: Option<KeyRange>,
) -> Pin<Box<dyn Future<Output = Result<i64, IndexedDBError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Counts rows that match range inside the transaction.
Sourcefn delete_range<'life0, 'async_trait>(
&'life0 mut self,
range: KeyRange,
) -> Pin<Box<dyn Future<Output = Result<i64, IndexedDBError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete_range<'life0, 'async_trait>(
&'life0 mut self,
range: KeyRange,
) -> Pin<Box<dyn Future<Output = Result<i64, IndexedDBError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Deletes rows that match range inside the transaction.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".