pub struct AssetsConfig {
pub enabled: Vec<String>,
pub default_quote: String,
pub optimize_assets: Vec<String>,
pub priority_assets: Vec<String>,
pub configs: HashMap<String, AssetConfig>,
}Fields§
§enabled: Vec<String>List of enabled trading assets (base currency symbols)
default_quote: StringDefault quote currency
optimize_assets: Vec<String>Assets to use for optimization runs
priority_assets: Vec<String>High priority assets (receive more frequent updates)
configs: HashMap<String, AssetConfig>Per-asset configurations
Implementations§
Source§impl AssetsConfig
impl AssetsConfig
Sourcepub fn enabled_symbols(&self) -> Vec<String>
pub fn enabled_symbols(&self) -> Vec<String>
Get list of enabled trading symbols (e.g., “BTC/USD”)
Sourcepub fn get(&self, asset: &str) -> Option<&AssetConfig>
pub fn get(&self, asset: &str) -> Option<&AssetConfig>
Get config for a specific asset
Sourcepub fn is_enabled(&self, asset: &str) -> bool
pub fn is_enabled(&self, asset: &str) -> bool
Check if an asset is enabled
Sourcepub fn is_priority(&self, asset: &str) -> bool
pub fn is_priority(&self, asset: &str) -> bool
Check if an asset is high priority
Trait Implementations§
Source§impl Clone for AssetsConfig
impl Clone for AssetsConfig
Source§fn clone(&self) -> AssetsConfig
fn clone(&self) -> AssetsConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 AssetsConfig
impl Debug for AssetsConfig
Source§impl Default for AssetsConfig
impl Default for AssetsConfig
Source§impl<'de> Deserialize<'de> for AssetsConfigwhere
AssetsConfig: Default,
impl<'de> Deserialize<'de> for AssetsConfigwhere
AssetsConfig: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for AssetsConfig
impl RefUnwindSafe for AssetsConfig
impl Send for AssetsConfig
impl Sync for AssetsConfig
impl Unpin for AssetsConfig
impl UnsafeUnpin for AssetsConfig
impl UnwindSafe for AssetsConfig
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