Trait finql_data::asset_handler::AssetHandler[][src]

pub trait AssetHandler {
    fn insert_asset<'life0, 'life1, 'async_trait>(
        &'life0 self,
        asset: &'life1 Asset
    ) -> Pin<Box<dyn Future<Output = Result<usize, DataError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: '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
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: '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
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: '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
        'life0: 'async_trait,
        Self: '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
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
fn get_all_assets<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Asset>, DataError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: '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
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
fn delete_asset<'life0, 'async_trait>(
        &'life0 self,
        id: usize
    ) -> Pin<Box<dyn Future<Output = Result<(), DataError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
fn get_all_currencies<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Currency>, DataError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; }
Expand description

Handler for globally available data of transactions and related data

Required methods

Return a list of all assets ordered by name

We assume here that a currency is an Asset with a three letter name and no ISIN nor WKN

Implementors