pub trait FdbStore:
Send
+ Sync
+ Debug
+ Sized
+ Clone {
Show 16 methods
// Required methods
fn load<'life0, 'async_trait, T>(
db: Arc<Database>,
key: &'life0 T,
) -> Pin<Box<dyn Future<Output = Result<Self, KvError>> + Send + 'async_trait>>
where T: Serialize + Sync + Sized + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait;
fn load_in_trx<'life0, 'life1, 'async_trait, T>(
trx: &'life0 RetryableTransaction,
key: &'life1 T,
) -> Pin<Box<dyn Future<Output = Result<Self, FdbBindingError>> + Send + 'async_trait>>
where T: Serialize + Sync + Sized + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn load_by_range<'async_trait, T>(
db: Arc<Database>,
query: RangeQuery<T>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Self>, KvError>> + Send + 'async_trait>>
where T: Serialize + Sync + Sized + Send + Clone + 'async_trait,
Self: 'async_trait;
fn load_by_range_in_trx<'life0, 'async_trait, T>(
trx: &'life0 RetryableTransaction,
query: RangeQuery<T>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Self>, FdbBindingError>> + Send + 'async_trait>>
where T: Serialize + Sync + Sized + Send + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait;
fn save<'life0, 'async_trait>(
&'life0 self,
db: Arc<Database>,
) -> Pin<Box<dyn Future<Output = Result<(), KvError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn save_in_trx<'life0, 'life1, 'async_trait>(
&'life0 self,
trx: &'life1 RetryableTransaction,
) -> Pin<Box<dyn Future<Output = Result<(), FdbBindingError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn delete<'life0, 'async_trait>(
&'life0 self,
db: Arc<Database>,
) -> Pin<Box<dyn Future<Output = Result<(), KvError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn delete_in_trx<'life0, 'life1, 'async_trait>(
&'life0 self,
trx: &'life1 RetryableTransaction,
) -> Pin<Box<dyn Future<Output = Result<(), FdbBindingError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn update<'life0, 'async_trait>(
&'life0 self,
db: Arc<Database>,
new_value: Self,
) -> Pin<Box<dyn Future<Output = Result<(), KvError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn update_in_trx<'life0, 'life1, 'async_trait>(
&'life0 self,
trx: &'life1 RetryableTransaction,
new_value: Self,
) -> Pin<Box<dyn Future<Output = Result<(), FdbBindingError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn find_by_index<'life0, 'async_trait, T>(
db: Arc<Database>,
index_name: &'life0 str,
index_value: T,
) -> Pin<Box<dyn Future<Output = Result<Vec<Self>, KvError>> + Send + 'async_trait>>
where T: Serialize + Sync + Sized + Send + Clone + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait;
fn find_by_index_in_trx<'life0, 'life1, 'async_trait, T>(
trx: &'life0 RetryableTransaction,
index_name: &'life1 str,
index_value: T,
) -> Pin<Box<dyn Future<Output = Result<Vec<Self>, FdbBindingError>> + Send + 'async_trait>>
where T: Serialize + Sync + Sized + Send + Clone + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn find_by_unique_index<'life0, 'async_trait, T>(
db: Arc<Database>,
index_name: &'life0 str,
index_value: T,
) -> Pin<Box<dyn Future<Output = Result<Self, KvError>> + Send + 'async_trait>>
where T: Serialize + Sync + Sized + Send + Clone + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait;
fn find_by_unique_index_in_trx<'life0, 'life1, 'async_trait, T>(
trx: &'life0 RetryableTransaction,
index_name: &'life1 str,
index_value: T,
) -> Pin<Box<dyn Future<Output = Result<Self, FdbBindingError>> + Send + 'async_trait>>
where T: Serialize + Sync + Sized + Send + Clone + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn find_by_unique_index_range<'life0, 'async_trait, T>(
db: Arc<Database>,
index_name: &'life0 str,
query: RangeQuery<T>,
ignore_first_result: bool,
) -> Pin<Box<dyn Future<Output = Result<Vec<Self>, KvError>> + Send + 'async_trait>>
where T: Serialize + Sync + Sized + Send + Clone + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait;
fn find_by_unique_index_in_trx_range<'life0, 'life1, 'async_trait, T>(
trx: &'life0 RetryableTransaction,
index_name: &'life1 str,
query: RangeQuery<T>,
ignore_first_result: bool,
) -> Pin<Box<dyn Future<Output = Result<Vec<Self>, FdbBindingError>> + Send + 'async_trait>>
where T: Serialize + Sync + Sized + Send + Clone + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
FdbStore trait define all methods implemented by fdb_derive module.
Required Methods§
Sourcefn load<'life0, 'async_trait, T>(
db: Arc<Database>,
key: &'life0 T,
) -> Pin<Box<dyn Future<Output = Result<Self, KvError>> + Send + 'async_trait>>
fn load<'life0, 'async_trait, T>( db: Arc<Database>, key: &'life0 T, ) -> Pin<Box<dyn Future<Output = Result<Self, KvError>> + Send + 'async_trait>>
Load struct from FDB via primary key identified by fdb_key attribute
Sourcefn load_in_trx<'life0, 'life1, 'async_trait, T>(
trx: &'life0 RetryableTransaction,
key: &'life1 T,
) -> Pin<Box<dyn Future<Output = Result<Self, FdbBindingError>> + Send + 'async_trait>>
fn load_in_trx<'life0, 'life1, 'async_trait, T>( trx: &'life0 RetryableTransaction, key: &'life1 T, ) -> Pin<Box<dyn Future<Output = Result<Self, FdbBindingError>> + Send + 'async_trait>>
Load struct from FDB via primary key identified by fdb_key attribute in an existing transaction context
Sourcefn load_by_range<'async_trait, T>(
db: Arc<Database>,
query: RangeQuery<T>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Self>, KvError>> + Send + 'async_trait>>
fn load_by_range<'async_trait, T>( db: Arc<Database>, query: RangeQuery<T>, ) -> Pin<Box<dyn Future<Output = Result<Vec<Self>, KvError>> + Send + 'async_trait>>
Load struct from FDB via primary key range identified by fdb_key attribute
Sourcefn load_by_range_in_trx<'life0, 'async_trait, T>(
trx: &'life0 RetryableTransaction,
query: RangeQuery<T>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Self>, FdbBindingError>> + Send + 'async_trait>>
fn load_by_range_in_trx<'life0, 'async_trait, T>( trx: &'life0 RetryableTransaction, query: RangeQuery<T>, ) -> Pin<Box<dyn Future<Output = Result<Vec<Self>, FdbBindingError>> + Send + 'async_trait>>
Load struct from FDB via primary key range identified by fdb_key attribute in an existing transaction context
Sourcefn save<'life0, 'async_trait>(
&'life0 self,
db: Arc<Database>,
) -> Pin<Box<dyn Future<Output = Result<(), KvError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn save<'life0, 'async_trait>(
&'life0 self,
db: Arc<Database>,
) -> Pin<Box<dyn Future<Output = Result<(), KvError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Save struct and generate all secondary indexes identified by either fdb_index or fdb_unique_index
Sourcefn save_in_trx<'life0, 'life1, 'async_trait>(
&'life0 self,
trx: &'life1 RetryableTransaction,
) -> Pin<Box<dyn Future<Output = Result<(), FdbBindingError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn save_in_trx<'life0, 'life1, 'async_trait>(
&'life0 self,
trx: &'life1 RetryableTransaction,
) -> Pin<Box<dyn Future<Output = Result<(), FdbBindingError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Save struct and generate all secondary indexes identified by either fdb_index or fdb_unique_index in an existing transaction context
Sourcefn delete<'life0, 'async_trait>(
&'life0 self,
db: Arc<Database>,
) -> Pin<Box<dyn Future<Output = Result<(), KvError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete<'life0, 'async_trait>(
&'life0 self,
db: Arc<Database>,
) -> Pin<Box<dyn Future<Output = Result<(), KvError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Delete struct and clean up secondary indexes
Sourcefn delete_in_trx<'life0, 'life1, 'async_trait>(
&'life0 self,
trx: &'life1 RetryableTransaction,
) -> Pin<Box<dyn Future<Output = Result<(), FdbBindingError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_in_trx<'life0, 'life1, 'async_trait>(
&'life0 self,
trx: &'life1 RetryableTransaction,
) -> Pin<Box<dyn Future<Output = Result<(), FdbBindingError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Delete struct and clean up secondary indexes in an existing transaction context
Sourcefn update<'life0, 'async_trait>(
&'life0 self,
db: Arc<Database>,
new_value: Self,
) -> Pin<Box<dyn Future<Output = Result<(), KvError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn update<'life0, 'async_trait>(
&'life0 self,
db: Arc<Database>,
new_value: Self,
) -> Pin<Box<dyn Future<Output = Result<(), KvError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Update struct and all secondary indexes
Sourcefn update_in_trx<'life0, 'life1, 'async_trait>(
&'life0 self,
trx: &'life1 RetryableTransaction,
new_value: Self,
) -> Pin<Box<dyn Future<Output = Result<(), FdbBindingError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_in_trx<'life0, 'life1, 'async_trait>(
&'life0 self,
trx: &'life1 RetryableTransaction,
new_value: Self,
) -> Pin<Box<dyn Future<Output = Result<(), FdbBindingError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Update struct and all secondary indexes in an existing transaction context
Sourcefn find_by_index<'life0, 'async_trait, T>(
db: Arc<Database>,
index_name: &'life0 str,
index_value: T,
) -> Pin<Box<dyn Future<Output = Result<Vec<Self>, KvError>> + Send + 'async_trait>>
fn find_by_index<'life0, 'async_trait, T>( db: Arc<Database>, index_name: &'life0 str, index_value: T, ) -> Pin<Box<dyn Future<Output = Result<Vec<Self>, KvError>> + Send + 'async_trait>>
Find records by secondary index, the index are stored in the form key: fdb_index -> value: Vec<fdb_key>
Sourcefn find_by_index_in_trx<'life0, 'life1, 'async_trait, T>(
trx: &'life0 RetryableTransaction,
index_name: &'life1 str,
index_value: T,
) -> Pin<Box<dyn Future<Output = Result<Vec<Self>, FdbBindingError>> + Send + 'async_trait>>
fn find_by_index_in_trx<'life0, 'life1, 'async_trait, T>( trx: &'life0 RetryableTransaction, index_name: &'life1 str, index_value: T, ) -> Pin<Box<dyn Future<Output = Result<Vec<Self>, FdbBindingError>> + Send + 'async_trait>>
Find records by secondary index, the index are stored in the form key: fdb_index -> value: Vec<fdb_key> in an existing transaction context
Sourcefn find_by_unique_index<'life0, 'async_trait, T>(
db: Arc<Database>,
index_name: &'life0 str,
index_value: T,
) -> Pin<Box<dyn Future<Output = Result<Self, KvError>> + Send + 'async_trait>>
fn find_by_unique_index<'life0, 'async_trait, T>( db: Arc<Database>, index_name: &'life0 str, index_value: T, ) -> Pin<Box<dyn Future<Output = Result<Self, KvError>> + Send + 'async_trait>>
Find records by secondary uniq index, the index are stored in the form key: fdb_unique_index -> value: fdb_key
Sourcefn find_by_unique_index_in_trx<'life0, 'life1, 'async_trait, T>(
trx: &'life0 RetryableTransaction,
index_name: &'life1 str,
index_value: T,
) -> Pin<Box<dyn Future<Output = Result<Self, FdbBindingError>> + Send + 'async_trait>>
fn find_by_unique_index_in_trx<'life0, 'life1, 'async_trait, T>( trx: &'life0 RetryableTransaction, index_name: &'life1 str, index_value: T, ) -> Pin<Box<dyn Future<Output = Result<Self, FdbBindingError>> + Send + 'async_trait>>
Find records by secondary uniq index, the index are stored in the form key: fdb_unique_index -> value: fdb_key in an existing transaction context
Sourcefn find_by_unique_index_range<'life0, 'async_trait, T>(
db: Arc<Database>,
index_name: &'life0 str,
query: RangeQuery<T>,
ignore_first_result: bool,
) -> Pin<Box<dyn Future<Output = Result<Vec<Self>, KvError>> + Send + 'async_trait>>
fn find_by_unique_index_range<'life0, 'async_trait, T>( db: Arc<Database>, index_name: &'life0 str, query: RangeQuery<T>, ignore_first_result: bool, ) -> Pin<Box<dyn Future<Output = Result<Vec<Self>, KvError>> + Send + 'async_trait>>
Find records by secondary uniq index in a given range, if stop is None, the range goes to the end
Sourcefn find_by_unique_index_in_trx_range<'life0, 'life1, 'async_trait, T>(
trx: &'life0 RetryableTransaction,
index_name: &'life1 str,
query: RangeQuery<T>,
ignore_first_result: bool,
) -> Pin<Box<dyn Future<Output = Result<Vec<Self>, FdbBindingError>> + Send + 'async_trait>>
fn find_by_unique_index_in_trx_range<'life0, 'life1, 'async_trait, T>( trx: &'life0 RetryableTransaction, index_name: &'life1 str, query: RangeQuery<T>, ignore_first_result: bool, ) -> Pin<Box<dyn Future<Output = Result<Vec<Self>, FdbBindingError>> + Send + 'async_trait>>
Find records by secondary uniq index in a given range, if stop is None, the range goes to the end
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.