pub trait InstrumentRegistry: Send + Sync {
// Required methods
fn cache_order_mapping(
&self,
order_id: &str,
instrument_id: InstrumentId,
metadata: Option<OrderMetadata>,
);
fn lookup_by_order_id(&self, order_id: &str) -> Option<InstrumentId>;
fn normalize_symbol(
&self,
exchange_symbol: &str,
venue: Venue,
) -> SmartString;
fn remove_mapping(&self, order_id: &str);
fn cleanup_expired(&self);
fn get_cache_stats(&self) -> CacheStats;
fn clear_all(&self);
}Expand description
Trait for unified instrument registry operations
Required Methods§
Sourcefn cache_order_mapping(
&self,
order_id: &str,
instrument_id: InstrumentId,
metadata: Option<OrderMetadata>,
)
fn cache_order_mapping( &self, order_id: &str, instrument_id: InstrumentId, metadata: Option<OrderMetadata>, )
Cache bidirectional order ID to instrument mapping
Sourcefn lookup_by_order_id(&self, order_id: &str) -> Option<InstrumentId>
fn lookup_by_order_id(&self, order_id: &str) -> Option<InstrumentId>
Lookup instrument ID by order ID
Sourcefn normalize_symbol(&self, exchange_symbol: &str, venue: Venue) -> SmartString
fn normalize_symbol(&self, exchange_symbol: &str, venue: Venue) -> SmartString
Normalize exchange-specific symbol to standard format
Sourcefn remove_mapping(&self, order_id: &str)
fn remove_mapping(&self, order_id: &str)
Remove order mapping (e.g., when order is fully filled)
Sourcefn cleanup_expired(&self)
fn cleanup_expired(&self)
Cleanup expired entries
Sourcefn get_cache_stats(&self) -> CacheStats
fn get_cache_stats(&self) -> CacheStats
Get cache statistics