pub struct RedisCacheDatabaseAdapter {
pub encoding: SerializationEncoding,
/* private fields */
}Fields§
§encoding: SerializationEncodingTrait Implementations§
Source§impl CacheDatabaseAdapter for RedisCacheDatabaseAdapter
impl CacheDatabaseAdapter for RedisCacheDatabaseAdapter
Source§fn load_all<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<CacheMap>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn load_all<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<CacheMap>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Loads all cached data into memory. Read more
Source§fn load(&self) -> Result<HashMap<String, Bytes>>
fn load(&self) -> Result<HashMap<String, Bytes>>
Loads raw key-value data from the database. Read more
Source§fn load_currencies<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<HashMap<Ustr, Currency>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn load_currencies<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<HashMap<Ustr, Currency>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Loads all currencies from the cache. Read more
Source§fn load_instruments<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<HashMap<InstrumentId, InstrumentAny>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn load_instruments<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<HashMap<InstrumentId, InstrumentAny>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Loads all instruments from the cache. Read more
Source§fn load_synthetics<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<HashMap<InstrumentId, SyntheticInstrument>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn load_synthetics<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<HashMap<InstrumentId, SyntheticInstrument>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Loads all synthetic instruments from the cache. Read more
Source§fn load_accounts<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<HashMap<AccountId, AccountAny>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn load_accounts<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<HashMap<AccountId, AccountAny>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Loads all accounts from the cache. Read more
Source§fn load_orders<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<HashMap<ClientOrderId, OrderAny>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn load_orders<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<HashMap<ClientOrderId, OrderAny>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Loads all orders from the cache. Read more
Source§fn load_positions<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<HashMap<PositionId, Position>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn load_positions<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<HashMap<PositionId, Position>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Loads all positions from the cache. Read more
Source§fn load_index_order_position(&self) -> Result<HashMap<ClientOrderId, Position>>
fn load_index_order_position(&self) -> Result<HashMap<ClientOrderId, Position>>
Loads mapping from order IDs to position IDs. Read more
Source§fn load_index_order_client(&self) -> Result<HashMap<ClientOrderId, ClientId>>
fn load_index_order_client(&self) -> Result<HashMap<ClientOrderId, ClientId>>
Loads mapping from order IDs to client IDs. Read more
Source§fn load_currency<'life0, 'life1, 'async_trait>(
&'life0 self,
code: &'life1 Ustr,
) -> Pin<Box<dyn Future<Output = Result<Option<Currency>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_currency<'life0, 'life1, 'async_trait>(
&'life0 self,
code: &'life1 Ustr,
) -> Pin<Box<dyn Future<Output = Result<Option<Currency>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Loads a single currency by code. Read more
Source§fn load_instrument<'life0, 'life1, 'async_trait>(
&'life0 self,
instrument_id: &'life1 InstrumentId,
) -> Pin<Box<dyn Future<Output = Result<Option<InstrumentAny>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_instrument<'life0, 'life1, 'async_trait>(
&'life0 self,
instrument_id: &'life1 InstrumentId,
) -> Pin<Box<dyn Future<Output = Result<Option<InstrumentAny>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Loads a single instrument by ID. Read more
Source§fn load_synthetic<'life0, 'life1, 'async_trait>(
&'life0 self,
instrument_id: &'life1 InstrumentId,
) -> Pin<Box<dyn Future<Output = Result<Option<SyntheticInstrument>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_synthetic<'life0, 'life1, 'async_trait>(
&'life0 self,
instrument_id: &'life1 InstrumentId,
) -> Pin<Box<dyn Future<Output = Result<Option<SyntheticInstrument>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Loads a single synthetic instrument by ID. Read more
Source§fn load_account<'life0, 'life1, 'async_trait>(
&'life0 self,
account_id: &'life1 AccountId,
) -> Pin<Box<dyn Future<Output = Result<Option<AccountAny>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_account<'life0, 'life1, 'async_trait>(
&'life0 self,
account_id: &'life1 AccountId,
) -> Pin<Box<dyn Future<Output = Result<Option<AccountAny>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Loads a single account by ID. Read more
Source§fn load_order<'life0, 'life1, 'async_trait>(
&'life0 self,
client_order_id: &'life1 ClientOrderId,
) -> Pin<Box<dyn Future<Output = Result<Option<OrderAny>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_order<'life0, 'life1, 'async_trait>(
&'life0 self,
client_order_id: &'life1 ClientOrderId,
) -> Pin<Box<dyn Future<Output = Result<Option<OrderAny>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Loads a single order by client order ID. Read more
Source§fn load_position<'life0, 'life1, 'async_trait>(
&'life0 self,
position_id: &'life1 PositionId,
) -> Pin<Box<dyn Future<Output = Result<Option<Position>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_position<'life0, 'life1, 'async_trait>(
&'life0 self,
position_id: &'life1 PositionId,
) -> Pin<Box<dyn Future<Output = Result<Option<Position>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Loads a single position by position ID. Read more
Source§fn load_actor(
&self,
component_id: &ComponentId,
) -> Result<HashMap<String, Bytes>>
fn load_actor( &self, component_id: &ComponentId, ) -> Result<HashMap<String, Bytes>>
Loads actor state by component ID. Read more
Source§fn load_strategy(
&self,
strategy_id: &StrategyId,
) -> Result<HashMap<String, Bytes>>
fn load_strategy( &self, strategy_id: &StrategyId, ) -> Result<HashMap<String, Bytes>>
Loads strategy state by strategy ID. Read more
Source§fn add_order(&self, order: &OrderAny, client_id: Option<ClientId>) -> Result<()>
fn add_order(&self, order: &OrderAny, client_id: Option<ClientId>) -> Result<()>
Errors Read more
Source§fn load_quotes(&self, instrument_id: &InstrumentId) -> Result<Vec<QuoteTick>>
fn load_quotes(&self, instrument_id: &InstrumentId) -> Result<Vec<QuoteTick>>
Loads quote ticks by instrument ID. Read more
Source§fn load_trades(&self, instrument_id: &InstrumentId) -> Result<Vec<TradeTick>>
fn load_trades(&self, instrument_id: &InstrumentId) -> Result<Vec<TradeTick>>
Loads trade ticks by instrument ID. Read more
Source§fn load_bars(&self, instrument_id: &InstrumentId) -> Result<Vec<Bar>>
fn load_bars(&self, instrument_id: &InstrumentId) -> Result<Vec<Bar>>
Loads bars by instrument ID. Read more
Source§fn load_custom_data(&self, data_type: &DataType) -> Result<Vec<CustomData>>
fn load_custom_data(&self, data_type: &DataType) -> Result<Vec<CustomData>>
Loads custom data by data type. Read more
Source§fn load_order_snapshot(
&self,
client_order_id: &ClientOrderId,
) -> Result<Option<OrderSnapshot>>
fn load_order_snapshot( &self, client_order_id: &ClientOrderId, ) -> Result<Option<OrderSnapshot>>
Loads an order snapshot by client order ID. Read more
Source§fn load_position_snapshot(
&self,
position_id: &PositionId,
) -> Result<Option<PositionSnapshot>>
fn load_position_snapshot( &self, position_id: &PositionId, ) -> Result<Option<PositionSnapshot>>
Loads a position snapshot by position ID. Read more
Source§fn index_venue_order_id(
&self,
client_order_id: ClientOrderId,
venue_order_id: VenueOrderId,
) -> Result<()>
fn index_venue_order_id( &self, client_order_id: ClientOrderId, venue_order_id: VenueOrderId, ) -> Result<()>
Errors Read more
Source§fn index_order_position(
&self,
client_order_id: ClientOrderId,
position_id: PositionId,
) -> Result<()>
fn index_order_position( &self, client_order_id: ClientOrderId, position_id: PositionId, ) -> Result<()>
Errors Read more
§fn load_greeks<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<HashMap<InstrumentId, GreeksData>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn load_greeks<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<HashMap<InstrumentId, GreeksData>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Loads all [
GreeksData] from the cache. Read moreAuto Trait Implementations§
impl Freeze for RedisCacheDatabaseAdapter
impl !RefUnwindSafe for RedisCacheDatabaseAdapter
impl Send for RedisCacheDatabaseAdapter
impl Sync for RedisCacheDatabaseAdapter
impl Unpin for RedisCacheDatabaseAdapter
impl !UnwindSafe for RedisCacheDatabaseAdapter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more