pub trait AssetHandler {
// Required methods
fn insert_asset<'life0, 'life1, 'async_trait>(
&'life0 self,
asset: &'life1 Asset,
) -> Pin<Box<dyn Future<Output = Result<usize, DataError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn insert_asset_if_new<'life0, 'life1, 'async_trait>(
&'life0 self,
asset: &'life1 Asset,
rename_asset: bool,
) -> Pin<Box<dyn Future<Output = Result<usize, DataError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_asset_id<'life0, 'life1, 'async_trait>(
&'life0 self,
asset: &'life1 Asset,
) -> Pin<Box<dyn Future<Output = Option<usize>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_asset_by_id<'life0, 'async_trait>(
&'life0 self,
id: usize,
) -> Pin<Box<dyn Future<Output = Result<Asset, DataError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_asset_by_isin<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Asset, DataError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_all_assets<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Asset>, DataError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn update_asset<'life0, 'life1, 'async_trait>(
&'life0 self,
asset: &'life1 Asset,
) -> Pin<Box<dyn Future<Output = Result<(), DataError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn delete_asset<'life0, 'async_trait>(
&'life0 self,
id: usize,
) -> Pin<Box<dyn Future<Output = Result<(), DataError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_all_currencies<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Currency>, DataError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Handler for globally available data of transactions and related data
Required Methods§
fn insert_asset<'life0, 'life1, 'async_trait>(
&'life0 self,
asset: &'life1 Asset,
) -> Pin<Box<dyn Future<Output = Result<usize, DataError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn insert_asset_if_new<'life0, 'life1, 'async_trait>(
&'life0 self,
asset: &'life1 Asset,
rename_asset: bool,
) -> Pin<Box<dyn Future<Output = Result<usize, DataError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_asset_id<'life0, 'life1, 'async_trait>(
&'life0 self,
asset: &'life1 Asset,
) -> Pin<Box<dyn Future<Output = Option<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_asset_by_id<'life0, 'async_trait>(
&'life0 self,
id: usize,
) -> Pin<Box<dyn Future<Output = Result<Asset, DataError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_asset_by_isin<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Asset, DataError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Sourcefn get_all_assets<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Asset>, DataError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_all_assets<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Asset>, DataError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Return a list of all assets ordered by name