Skip to main content

InstrumentsCacheReader

Trait InstrumentsCacheReader 

pub trait InstrumentsCacheReader: Send + Sync {
    // Required methods
    fn get_by_symbol<'life0, 'life1, 'async_trait>(
        &'life0 self,
        symbol: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Option<Instrument>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
    fn allows_rfq(&self, symbol: &str) -> bool;
    fn get_by_underlying_and_expiry<'life0, 'life1, 'async_trait>(
        &'life0 self,
        underlying: &'life1 str,
        expiry: u64,
    ) -> Pin<Box<dyn Future<Output = Vec<Instrument>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
    fn get_by_instrument_id<'life0, 'async_trait>(
        &'life0 self,
        instrument_id: i32,
    ) -> Pin<Box<dyn Future<Output = Option<Instrument>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn get_all<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Vec<Instrument>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn len<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = usize> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn reload_from_db<'life0, 'life1, 'async_trait>(
        &'life0 self,
        db: &'life1 dyn BootstrapReader,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
}

Required Methods§

fn get_by_symbol<'life0, 'life1, 'async_trait>( &'life0 self, symbol: &'life1 str, ) -> Pin<Box<dyn Future<Output = Option<Instrument>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

fn allows_rfq(&self, symbol: &str) -> bool

fn get_by_underlying_and_expiry<'life0, 'life1, 'async_trait>( &'life0 self, underlying: &'life1 str, expiry: u64, ) -> Pin<Box<dyn Future<Output = Vec<Instrument>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

fn get_by_instrument_id<'life0, 'async_trait>( &'life0 self, instrument_id: i32, ) -> Pin<Box<dyn Future<Output = Option<Instrument>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

fn get_all<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Vec<Instrument>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

fn len<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = usize> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

fn reload_from_db<'life0, 'life1, 'async_trait>( &'life0 self, db: &'life1 dyn BootstrapReader, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Implementors§