pub trait StatisticHandler<Statistic> {
    fn set_statistics(
        &mut self,
        market_id: &MarketId,
        statistic: Statistic
    ) -> Result<(), RepositoryError>; fn get_statistics(
        &mut self,
        market_id: &MarketId
    ) -> Result<Statistic, RepositoryError>; }
Expand description

Handles the reading & writing of a Portfolio’s statistics for each of it’s markets, where each market is represented by a MarketId.

Required methods

Upsert the market statistics at the MarketId provided.

Get the market statistics using the MarketId provided.

Implementors