Trait finql_data::quote_handler::QuoteHandler[][src]

pub trait QuoteHandler: AssetHandler {
#[must_use]    fn insert_ticker<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        ticker: &'life1 Ticker
    ) -> Pin<Box<dyn Future<Output = Result<usize, DataError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn get_ticker_id<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        ticker: &'life1 str
    ) -> Pin<Box<dyn Future<Output = Option<usize>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn insert_if_new_ticker<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        ticker: &'life1 Ticker
    ) -> Pin<Box<dyn Future<Output = Result<usize, DataError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn get_ticker_by_id<'life0, 'async_trait>(
        &'life0 mut self,
        id: usize
    ) -> Pin<Box<dyn Future<Output = Result<Ticker, DataError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn get_all_ticker<'life0, 'async_trait>(
        &'life0 mut self
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Ticker>, DataError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn get_all_ticker_for_source<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        source: &'life1 str
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Ticker>, DataError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn get_all_ticker_for_asset<'life0, 'async_trait>(
        &'life0 mut self,
        asset_id: usize
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Ticker>, DataError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn update_ticker<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        ticker: &'life1 Ticker
    ) -> Pin<Box<dyn Future<Output = Result<(), DataError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn delete_ticker<'life0, 'async_trait>(
        &'life0 mut self,
        id: usize
    ) -> Pin<Box<dyn Future<Output = Result<(), DataError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn insert_quote<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        quote: &'life1 Quote
    ) -> Pin<Box<dyn Future<Output = Result<usize, DataError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn get_last_quote_before<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        asset_name: &'life1 str,
        time: DateTime<Utc>
    ) -> Pin<Box<dyn Future<Output = Result<(Quote, Currency), DataError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn get_last_quote_before_by_id<'life0, 'async_trait>(
        &'life0 mut self,
        asset_id: usize,
        time: DateTime<Utc>
    ) -> Pin<Box<dyn Future<Output = Result<(Quote, Currency), DataError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn get_all_quotes_for_ticker<'life0, 'async_trait>(
        &'life0 mut self,
        ticker_id: usize
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Quote>, DataError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn update_quote<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        quote: &'life1 Quote
    ) -> Pin<Box<dyn Future<Output = Result<(), DataError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn delete_quote<'life0, 'async_trait>(
        &'life0 mut self,
        id: usize
    ) -> Pin<Box<dyn Future<Output = Result<(), DataError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn get_rounding_digits<'life0, 'async_trait>(
        &'life0 mut self,
        currency: Currency
    ) -> Pin<Box<dyn Future<Output = i32> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn set_rounding_digits<'life0, 'async_trait>(
        &'life0 mut self,
        currency: Currency,
        digits: i32
    ) -> Pin<Box<dyn Future<Output = Result<(), DataError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; }

Handler for globally available market quotes data

Required methods

#[must_use]fn insert_ticker<'life0, 'life1, 'async_trait>(
    &'life0 mut self,
    ticker: &'life1 Ticker
) -> Pin<Box<dyn Future<Output = Result<usize, DataError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]fn get_ticker_id<'life0, 'life1, 'async_trait>(
    &'life0 mut self,
    ticker: &'life1 str
) -> Pin<Box<dyn Future<Output = Option<usize>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]fn insert_if_new_ticker<'life0, 'life1, 'async_trait>(
    &'life0 mut self,
    ticker: &'life1 Ticker
) -> Pin<Box<dyn Future<Output = Result<usize, DataError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]fn get_ticker_by_id<'life0, 'async_trait>(
    &'life0 mut self,
    id: usize
) -> Pin<Box<dyn Future<Output = Result<Ticker, DataError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]fn get_all_ticker<'life0, 'async_trait>(
    &'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<Vec<Ticker>, DataError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]fn get_all_ticker_for_source<'life0, 'life1, 'async_trait>(
    &'life0 mut self,
    source: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Vec<Ticker>, DataError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]fn get_all_ticker_for_asset<'life0, 'async_trait>(
    &'life0 mut self,
    asset_id: usize
) -> Pin<Box<dyn Future<Output = Result<Vec<Ticker>, DataError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Get all ticker that belong to a given asset specified by its asset ID

#[must_use]fn update_ticker<'life0, 'life1, 'async_trait>(
    &'life0 mut self,
    ticker: &'life1 Ticker
) -> Pin<Box<dyn Future<Output = Result<(), DataError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]fn delete_ticker<'life0, 'async_trait>(
    &'life0 mut self,
    id: usize
) -> Pin<Box<dyn Future<Output = Result<(), DataError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]fn insert_quote<'life0, 'life1, 'async_trait>(
    &'life0 mut self,
    quote: &'life1 Quote
) -> Pin<Box<dyn Future<Output = Result<usize, DataError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

Insert, get, update and delete for market data sources

#[must_use]fn get_last_quote_before<'life0, 'life1, 'async_trait>(
    &'life0 mut self,
    asset_name: &'life1 str,
    time: DateTime<Utc>
) -> Pin<Box<dyn Future<Output = Result<(Quote, Currency), DataError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

Get the last quote in database for a specific asset name on or before the given time

#[must_use]fn get_last_quote_before_by_id<'life0, 'async_trait>(
    &'life0 mut self,
    asset_id: usize,
    time: DateTime<Utc>
) -> Pin<Box<dyn Future<Output = Result<(Quote, Currency), DataError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Get the last quote in database for a specific asset id on or before the given time

#[must_use]fn get_all_quotes_for_ticker<'life0, 'async_trait>(
    &'life0 mut self,
    ticker_id: usize
) -> Pin<Box<dyn Future<Output = Result<Vec<Quote>, DataError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]fn update_quote<'life0, 'life1, 'async_trait>(
    &'life0 mut self,
    quote: &'life1 Quote
) -> Pin<Box<dyn Future<Output = Result<(), DataError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]fn delete_quote<'life0, 'async_trait>(
    &'life0 mut self,
    id: usize
) -> Pin<Box<dyn Future<Output = Result<(), DataError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]fn get_rounding_digits<'life0, 'async_trait>(
    &'life0 mut self,
    currency: Currency
) -> Pin<Box<dyn Future<Output = i32> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]fn set_rounding_digits<'life0, 'async_trait>(
    &'life0 mut self,
    currency: Currency,
    digits: i32
) -> Pin<Box<dyn Future<Output = Result<(), DataError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Loading content...

Trait Implementations

impl CurrencyConverter for dyn QuoteHandler + Send[src]

Implementors

Loading content...