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

pub trait AssetHandler {
    fn insert_asset(&mut self, asset: &Asset) -> Result<usize, DataError>;
fn get_asset_id(&mut self, asset: &Asset) -> Option<usize>;
fn get_asset_by_id(&mut self, id: usize) -> Result<Asset, DataError>;
fn get_asset_by_isin(&mut self, id: &str) -> Result<Asset, DataError>;
fn get_all_assets(&mut self) -> Result<Vec<Asset>, DataError>;
fn update_asset(&mut self, asset: &Asset) -> Result<(), DataError>;
fn delete_asset(&mut self, id: usize) -> Result<(), DataError>;
fn get_all_currencies(&mut self) -> Result<Vec<Currency>, DataError>; fn insert_asset_if_new(
        &mut self,
        asset: &Asset,
        rename_asset: bool
    ) -> Result<usize, DataError> { ... } }

Handler for globally available data of transactions and related data

Required methods

fn insert_asset(&mut self, asset: &Asset) -> Result<usize, DataError>[src]

fn get_asset_id(&mut self, asset: &Asset) -> Option<usize>[src]

fn get_asset_by_id(&mut self, id: usize) -> Result<Asset, DataError>[src]

fn get_asset_by_isin(&mut self, id: &str) -> Result<Asset, DataError>[src]

fn get_all_assets(&mut self) -> Result<Vec<Asset>, DataError>[src]

Return a list of all assets ordered by name

fn update_asset(&mut self, asset: &Asset) -> Result<(), DataError>[src]

fn delete_asset(&mut self, id: usize) -> Result<(), DataError>[src]

fn get_all_currencies(&mut self) -> Result<Vec<Currency>, DataError>[src]

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

Loading content...

Provided methods

fn insert_asset_if_new(
    &mut self,
    asset: &Asset,
    rename_asset: bool
) -> Result<usize, DataError>
[src]

Loading content...

Implementors

Loading content...