pub trait CacheDatabaseAdapter {
Show 66 methods
// Required methods
fn close(&mut self) -> Result<()>;
fn flush(&mut self) -> Result<()>;
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(&self) -> Result<AHashMap<String, Bytes>>;
fn load_currencies<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<AHashMap<Ustr, Currency>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn load_instruments<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<AHashMap<InstrumentId, InstrumentAny>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn load_instrument_closes<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<AHashMap<InstrumentId, InstrumentClose>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn load_synthetics<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<AHashMap<InstrumentId, SyntheticInstrument>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn load_accounts<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<AHashMap<AccountId, AccountAny>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn load_orders<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<AHashMap<ClientOrderId, OrderAny>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn load_positions<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<AHashMap<PositionId, Position>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn load_index_order_position(
&self,
) -> Result<AHashMap<ClientOrderId, PositionId>>;
fn load_index_order_client(
&self,
) -> Result<AHashMap<ClientOrderId, ClientId>>;
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_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_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_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_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_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_actor(&self, actor_id: &ActorId) -> Result<AHashMap<String, Bytes>>;
fn load_strategy(
&self,
strategy_id: &StrategyId,
) -> Result<AHashMap<String, Bytes>>;
fn load_signals(&self, name: &str) -> Result<Vec<Signal>>;
fn load_custom_data(&self, data_type: &DataType) -> Result<Vec<CustomData>>;
fn load_order_snapshot(
&self,
client_order_id: &ClientOrderId,
) -> Result<Option<OrderSnapshot>>;
fn load_position_snapshot(
&self,
position_id: &PositionId,
) -> Result<Option<PositionSnapshot>>;
fn load_quotes(
&self,
instrument_id: &InstrumentId,
) -> Result<Vec<QuoteTick>>;
fn load_trades(
&self,
instrument_id: &InstrumentId,
) -> Result<Vec<TradeTick>>;
fn load_funding_rates(
&self,
instrument_id: &InstrumentId,
) -> Result<Vec<FundingRateUpdate>>;
fn load_bars(&self, instrument_id: &InstrumentId) -> Result<Vec<Bar>>;
fn add(&self, key: String, value: Bytes) -> Result<()>;
fn add_currency(&self, currency: &Currency) -> Result<()>;
fn add_instrument(&self, instrument: &InstrumentAny) -> Result<()>;
fn add_instrument_close(&self, close: &InstrumentClose) -> Result<()>;
fn add_synthetic(&self, synthetic: &SyntheticInstrument) -> Result<()>;
fn add_account(&self, account: &AccountAny) -> Result<()>;
fn add_order(
&self,
order: &OrderAny,
client_id: Option<ClientId>,
) -> Result<()>;
fn add_order_snapshot(&self, snapshot: &OrderSnapshot) -> Result<()>;
fn add_position(&self, position: &Position) -> Result<()>;
fn add_position_snapshot(&self, snapshot: &PositionSnapshot) -> Result<()>;
fn add_order_book(&self, order_book: &OrderBook) -> Result<()>;
fn add_signal(&self, signal: &Signal) -> Result<()>;
fn add_custom_data(&self, data: &CustomData) -> Result<()>;
fn add_quote(&self, quote: &QuoteTick) -> Result<()>;
fn add_trade(&self, trade: &TradeTick) -> Result<()>;
fn add_funding_rate(&self, funding_rate: &FundingRateUpdate) -> Result<()>;
fn add_bar(&self, bar: &Bar) -> Result<()>;
fn delete_actor(&self, actor_id: &ActorId) -> Result<()>;
fn delete_strategy(&self, component_id: &StrategyId) -> Result<()>;
fn delete_order(&self, client_order_id: &ClientOrderId) -> Result<()>;
fn delete_position(&self, position_id: &PositionId) -> Result<()>;
fn delete_account_event(
&self,
account_id: &AccountId,
event_id: &str,
) -> Result<()>;
fn index_venue_order_id(
&self,
client_order_id: ClientOrderId,
venue_order_id: VenueOrderId,
) -> Result<()>;
fn index_order_position(
&self,
client_order_id: ClientOrderId,
position_id: PositionId,
) -> Result<()>;
fn update_actor(
&self,
actor_id: &ActorId,
state: &AHashMap<String, Bytes>,
) -> Result<()>;
fn update_strategy(
&self,
strategy_id: &StrategyId,
state: &AHashMap<String, Bytes>,
) -> Result<()>;
fn update_account(&self, account: &AccountAny) -> Result<()>;
fn update_order(&self, order_event: &OrderEventAny) -> Result<()>;
fn update_position(&self, position: &Position) -> Result<()>;
fn snapshot_order_state(&self, order: &OrderAny) -> Result<()>;
fn snapshot_position_state(
&self,
position: &Position,
ts_snapshot: UnixNanos,
unrealized_pnl: Option<Money>,
) -> Result<()>;
fn heartbeat(&self, timestamp: UnixNanos) -> Result<()>;
// Provided methods
fn load_greeks<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<AHashMap<InstrumentId, GreeksData>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn load_yield_curves<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<AHashMap<String, YieldCurveData>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn add_greeks(&self, _greeks: &GreeksData) -> Result<()> { ... }
fn add_yield_curve(&self, _yield_curve: &YieldCurveData) -> Result<()> { ... }
fn index_order_clients(
&self,
claims: &[(ClientOrderId, ClientId)],
) -> Result<()> { ... }
}Required Methods§
Sourcefn close(&mut self) -> Result<()>
fn close(&mut self) -> Result<()>
Closes the cache database connection.
§Errors
Returns an error if the database fails to close properly.
Sourcefn 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.
§Errors
Returns an error if loading data from the database fails.
Sourcefn load_currencies<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<AHashMap<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<AHashMap<Ustr, Currency>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn load_instruments<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<AHashMap<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<AHashMap<InstrumentId, InstrumentAny>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn load_instrument_closes<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<AHashMap<InstrumentId, InstrumentClose>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn load_instrument_closes<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<AHashMap<InstrumentId, InstrumentClose>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Loads all instrument closes from the cache.
§Errors
Returns an error if loading instrument closes fails.
Sourcefn load_synthetics<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<AHashMap<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<AHashMap<InstrumentId, SyntheticInstrument>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Loads all synthetic instruments from the cache.
§Errors
Returns an error if loading synthetic instruments fails.
Sourcefn load_accounts<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<AHashMap<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<AHashMap<AccountId, AccountAny>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn load_orders<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<AHashMap<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<AHashMap<ClientOrderId, OrderAny>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn load_positions<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<AHashMap<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<AHashMap<PositionId, Position>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn load_index_order_position(
&self,
) -> Result<AHashMap<ClientOrderId, PositionId>>
fn load_index_order_position( &self, ) -> Result<AHashMap<ClientOrderId, PositionId>>
Loads mapping from order IDs to position IDs.
§Errors
Returns an error if loading the index order-position mapping fails.
Sourcefn load_index_order_client(&self) -> Result<AHashMap<ClientOrderId, ClientId>>
fn load_index_order_client(&self) -> Result<AHashMap<ClientOrderId, ClientId>>
Loads mapping from order IDs to client IDs.
§Errors
Returns an error if loading the index order-client mapping fails.
Sourcefn 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,
Sourcefn 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,
Sourcefn 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.
§Errors
Returns an error if loading a single synthetic instrument fails.
Sourcefn 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,
Sourcefn 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,
Sourcefn 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.
§Errors
Returns an error if loading a single position fails.
Sourcefn load_strategy(
&self,
strategy_id: &StrategyId,
) -> Result<AHashMap<String, Bytes>>
fn load_strategy( &self, strategy_id: &StrategyId, ) -> Result<AHashMap<String, Bytes>>
Sourcefn load_custom_data(&self, data_type: &DataType) -> Result<Vec<CustomData>>
fn load_custom_data(&self, data_type: &DataType) -> Result<Vec<CustomData>>
Sourcefn 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.
§Errors
Returns an error if loading the order snapshot fails.
Sourcefn 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.
§Errors
Returns an error if loading the position snapshot fails.
Sourcefn load_quotes(&self, instrument_id: &InstrumentId) -> Result<Vec<QuoteTick>>
fn load_quotes(&self, instrument_id: &InstrumentId) -> Result<Vec<QuoteTick>>
Sourcefn load_trades(&self, instrument_id: &InstrumentId) -> Result<Vec<TradeTick>>
fn load_trades(&self, instrument_id: &InstrumentId) -> Result<Vec<TradeTick>>
Sourcefn load_funding_rates(
&self,
instrument_id: &InstrumentId,
) -> Result<Vec<FundingRateUpdate>>
fn load_funding_rates( &self, instrument_id: &InstrumentId, ) -> Result<Vec<FundingRateUpdate>>
Loads funding rate updates by instrument ID.
§Errors
Returns an error if loading funding rates fails.
Sourcefn add(&self, key: String, value: Bytes) -> Result<()>
fn add(&self, key: String, value: Bytes) -> Result<()>
Adds a generic key-value pair to the cache.
§Errors
Returns an error if adding a generic key/value fails.
Sourcefn add_currency(&self, currency: &Currency) -> Result<()>
fn add_currency(&self, currency: &Currency) -> Result<()>
Sourcefn add_instrument(&self, instrument: &InstrumentAny) -> Result<()>
fn add_instrument(&self, instrument: &InstrumentAny) -> Result<()>
Sourcefn add_instrument_close(&self, close: &InstrumentClose) -> Result<()>
fn add_instrument_close(&self, close: &InstrumentClose) -> Result<()>
Adds an instrument close to the cache, replacing any existing value for the instrument. Implementations must queue persistence without waiting for the database operation to complete.
§Errors
Returns an error if the instrument close cannot be queued for persistence.
Sourcefn add_synthetic(&self, synthetic: &SyntheticInstrument) -> Result<()>
fn add_synthetic(&self, synthetic: &SyntheticInstrument) -> Result<()>
Adds a synthetic instrument to the cache.
§Errors
Returns an error if adding a synthetic instrument fails.
Sourcefn add_account(&self, account: &AccountAny) -> Result<()>
fn add_account(&self, account: &AccountAny) -> Result<()>
Sourcefn add_order_snapshot(&self, snapshot: &OrderSnapshot) -> Result<()>
fn add_order_snapshot(&self, snapshot: &OrderSnapshot) -> Result<()>
Sourcefn add_position(&self, position: &Position) -> Result<()>
fn add_position(&self, position: &Position) -> Result<()>
Sourcefn add_position_snapshot(&self, snapshot: &PositionSnapshot) -> Result<()>
fn add_position_snapshot(&self, snapshot: &PositionSnapshot) -> Result<()>
Adds a position snapshot to the cache.
§Errors
Returns an error if adding a position snapshot fails.
Sourcefn add_order_book(&self, order_book: &OrderBook) -> Result<()>
fn add_order_book(&self, order_book: &OrderBook) -> Result<()>
Sourcefn add_signal(&self, signal: &Signal) -> Result<()>
fn add_signal(&self, signal: &Signal) -> Result<()>
Sourcefn add_custom_data(&self, data: &CustomData) -> Result<()>
fn add_custom_data(&self, data: &CustomData) -> Result<()>
Sourcefn add_funding_rate(&self, funding_rate: &FundingRateUpdate) -> Result<()>
fn add_funding_rate(&self, funding_rate: &FundingRateUpdate) -> Result<()>
Adds a funding rate update to the cache.
§Errors
Returns an error if adding a funding rate update fails.
Sourcefn delete_actor(&self, actor_id: &ActorId) -> Result<()>
fn delete_actor(&self, actor_id: &ActorId) -> Result<()>
Sourcefn delete_strategy(&self, component_id: &StrategyId) -> Result<()>
fn delete_strategy(&self, component_id: &StrategyId) -> Result<()>
Sourcefn delete_order(&self, client_order_id: &ClientOrderId) -> Result<()>
fn delete_order(&self, client_order_id: &ClientOrderId) -> Result<()>
Sourcefn delete_position(&self, position_id: &PositionId) -> Result<()>
fn delete_position(&self, position_id: &PositionId) -> Result<()>
Sourcefn 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<()>
Indexes a venue order ID with its client order ID.
§Errors
Returns an error if indexing venue order ID fails.
Sourcefn 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<()>
Indexes an order-position mapping.
§Errors
Returns an error if indexing order-position mapping fails.
Sourcefn update_strategy(
&self,
strategy_id: &StrategyId,
state: &AHashMap<String, Bytes>,
) -> Result<()>
fn update_strategy( &self, strategy_id: &StrategyId, state: &AHashMap<String, Bytes>, ) -> Result<()>
Sourcefn update_account(&self, account: &AccountAny) -> Result<()>
fn update_account(&self, account: &AccountAny) -> Result<()>
Sourcefn update_order(&self, order_event: &OrderEventAny) -> Result<()>
fn update_order(&self, order_event: &OrderEventAny) -> Result<()>
Updates an order in the cache with an order event.
§Errors
Returns an error if updating an order fails.
Sourcefn update_position(&self, position: &Position) -> Result<()>
fn update_position(&self, position: &Position) -> Result<()>
Sourcefn snapshot_order_state(&self, order: &OrderAny) -> Result<()>
fn snapshot_order_state(&self, order: &OrderAny) -> Result<()>
Provided Methods§
Sourcefn load_greeks<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<AHashMap<InstrumentId, GreeksData>>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn load_greeks<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<AHashMap<InstrumentId, GreeksData>>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Sourcefn load_yield_curves<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<AHashMap<String, YieldCurveData>>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn load_yield_curves<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<AHashMap<String, YieldCurveData>>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Loads all YieldCurveData from the cache.
§Errors
Returns an error if loading yield curve data fails.
Sourcefn add_greeks(&self, _greeks: &GreeksData) -> Result<()>
fn add_greeks(&self, _greeks: &GreeksData) -> Result<()>
Sourcefn add_yield_curve(&self, _yield_curve: &YieldCurveData) -> Result<()>
fn add_yield_curve(&self, _yield_curve: &YieldCurveData) -> Result<()>
Sourcefn index_order_clients(
&self,
claims: &[(ClientOrderId, ClientId)],
) -> Result<()>
fn index_order_clients( &self, claims: &[(ClientOrderId, ClientId)], ) -> Result<()>
Indexes order-client mappings as one batch operation.
§Errors
Returns an error if batch order-client indexing is unsupported or cannot be enqueued.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".