pub trait KeysDatabase {
type Err: Into<Error> + From<Error>;
// Required methods
fn begin_transaction<'a, 'async_trait>(
&'a self,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn KeysDatabaseTransaction<'a, Self::Err> + Send + Sync + 'a>, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'a: 'async_trait;
fn get_active_keyset_id<'life0, 'life1, 'async_trait>(
&'life0 self,
unit: &'life1 CurrencyUnit,
) -> Pin<Box<dyn Future<Output = Result<Option<Id>, Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_active_keysets<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<HashMap<CurrencyUnit, Id>, Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_keyset_info<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 Id,
) -> Pin<Box<dyn Future<Output = Result<Option<MintKeySetInfo>, Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_keyset_infos<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<MintKeySetInfo>, Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
Mint Keys Database trait
Required Associated Types§
Required Methods§
Sourcefn begin_transaction<'a, 'async_trait>(
&'a self,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn KeysDatabaseTransaction<'a, Self::Err> + Send + Sync + 'a>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
fn begin_transaction<'a, 'async_trait>(
&'a self,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn KeysDatabaseTransaction<'a, Self::Err> + Send + Sync + 'a>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
Beings a transaction
Sourcefn get_active_keyset_id<'life0, 'life1, 'async_trait>(
&'life0 self,
unit: &'life1 CurrencyUnit,
) -> Pin<Box<dyn Future<Output = Result<Option<Id>, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_active_keyset_id<'life0, 'life1, 'async_trait>(
&'life0 self,
unit: &'life1 CurrencyUnit,
) -> Pin<Box<dyn Future<Output = Result<Option<Id>, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get Active Keyset
Sourcefn get_active_keysets<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<HashMap<CurrencyUnit, Id>, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_active_keysets<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<HashMap<CurrencyUnit, Id>, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get all Active Keyset
Sourcefn get_keyset_info<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 Id,
) -> Pin<Box<dyn Future<Output = Result<Option<MintKeySetInfo>, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_keyset_info<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 Id,
) -> Pin<Box<dyn Future<Output = Result<Option<MintKeySetInfo>, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get MintKeySetInfo
Sourcefn get_keyset_infos<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<MintKeySetInfo>, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_keyset_infos<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<MintKeySetInfo>, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get MintKeySetInfo
s