pub trait MarketService: Send + Sync {
// Required methods
fn search_markets<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session: &'life1 IgSession,
search_term: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<MarketSearchResult, AppError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn get_market_details<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session: &'life1 IgSession,
epic: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<MarketDetails, AppError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn get_historical_prices<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
session: &'life1 IgSession,
epic: &'life2 str,
resolution: &'life3 str,
from: &'life4 str,
to: &'life5 str,
) -> Pin<Box<dyn Future<Output = Result<HistoricalPricesResponse, AppError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait;
}Expand description
Interface for the market service
Required Methods§
Sourcefn search_markets<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session: &'life1 IgSession,
search_term: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<MarketSearchResult, AppError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn search_markets<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session: &'life1 IgSession,
search_term: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<MarketSearchResult, AppError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Searches markets by search term
Sourcefn get_market_details<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session: &'life1 IgSession,
epic: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<MarketDetails, AppError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_market_details<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session: &'life1 IgSession,
epic: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<MarketDetails, AppError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Gets details of a specific market by its EPIC
Sourcefn get_historical_prices<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
session: &'life1 IgSession,
epic: &'life2 str,
resolution: &'life3 str,
from: &'life4 str,
to: &'life5 str,
) -> Pin<Box<dyn Future<Output = Result<HistoricalPricesResponse, AppError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
fn get_historical_prices<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
session: &'life1 IgSession,
epic: &'life2 str,
resolution: &'life3 str,
from: &'life4 str,
to: &'life5 str,
) -> Pin<Box<dyn Future<Output = Result<HistoricalPricesResponse, AppError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
Gets historical prices for a market