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 { } } */ pub trait GetEquity { type Paramaters; fn get_equity(&mut self, paramaters: Self::Paramaters) -> DynResult; } pub trait GetCrypto { type Paramaters; fn get_crypto(&mut self, paramaters: Self::Paramaters) -> DynResult; } pub trait GetOptionContract { type Paramaters; fn get_option_contract(&mut self, paramaters: Self::Paramaters) -> DynResult; } pub trait GetOptionChain { type Paramaters; fn get_options_chain_vec(&mut self, paramaters: Self::Paramaters) -> DynResult>; fn get_options_chain_dataframe(&mut self, paramaters: Self::Paramaters) -> DynResult; } pub trait GetPriceHistory{ type Paramaters; fn get_price_history(&mut self, paramaters: Self::Paramaters)-> DynResult; }