pub struct MarketCache {
pub markets: HashMap<String, Market>,
pub markets_by_id: HashMap<String, Market>,
pub currencies: HashMap<String, Currency>,
pub currencies_by_id: HashMap<String, Currency>,
pub symbols: Vec<String>,
pub codes: Vec<String>,
pub ids: Vec<String>,
pub loaded: bool,
}Expand description
Market data cache structure
Fields§
§markets: HashMap<String, Market>Markets indexed by symbol (e.g., “BTC/USDT”)
markets_by_id: HashMap<String, Market>Markets indexed by exchange-specific ID
currencies: HashMap<String, Currency>Currencies indexed by code (e.g., “BTC”)
currencies_by_id: HashMap<String, Currency>Currencies indexed by exchange-specific ID
symbols: Vec<String>List of all trading pair symbols
codes: Vec<String>List of all currency codes
ids: Vec<String>List of all market IDs
loaded: boolWhether markets have been loaded
Trait Implementations§
Source§impl Clone for MarketCache
impl Clone for MarketCache
Source§fn clone(&self) -> MarketCache
fn clone(&self) -> MarketCache
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MarketCache
impl Debug for MarketCache
Auto Trait Implementations§
impl Freeze for MarketCache
impl RefUnwindSafe for MarketCache
impl Send for MarketCache
impl Sync for MarketCache
impl Unpin for MarketCache
impl UnwindSafe for MarketCache
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