use crate::data::*; use crate::DynResult; /* A data service must implement at lease one of the following traits Important to note that Paramaters can be typed as Option
during implemenation
and that the actual strucut/type passed into these is flexable. This should allow
each services library to implement a paramates trait that works for them, or
leave paramaters as 'None'
This way you can lock down what paramaters are required for each indiviudual service
while still allowing the RustyTrade framework to reliably obtain the expected struct
from each trait interface.
struct ExamplePriceHistoryParams {
start_date: i64,
end_date: i64
}
struct ExampleDataService {};
impl GetPriceHistory for ExampleDataService {
type Paramaters = ExamplePriceHistoryParmas;
fn get_price_history(&mut self, paramaters: Self::Paramaters)-> DynResult