pub struct Manager { /* private fields */ }Implementations§
Source§impl Manager
impl Manager
pub fn new() -> Self
Sourcepub fn is_ready(&self) -> bool
pub fn is_ready(&self) -> bool
True only after both spot and zipper snapshots were validated and installed atomically.
Sourcepub fn hydrate_spot_config_json(&self, value: Value) -> Result<()>
pub fn hydrate_spot_config_json(&self, value: Value) -> Result<()>
Validate and install spot config atomically (no partial row mutation).
Sourcepub fn hydrate_zipper_config(
&self,
config: &DepositWithdrawConfig,
) -> Result<()>
pub fn hydrate_zipper_config( &self, config: &DepositWithdrawConfig, ) -> Result<()>
Typed Zipper hydrate — consumers do not need a direct serde_json dependency.
Sourcepub fn hydrate_zipper_config_json(&self, value: Value) -> Result<()>
pub fn hydrate_zipper_config_json(&self, value: Value) -> Result<()>
Validate and install zipper config atomically (no partial row mutation).
Sourcepub fn hydrate_spot_and_zipper_json(
&self,
spot: Value,
zipper: Value,
) -> Result<()>
pub fn hydrate_spot_and_zipper_json( &self, spot: Value, zipper: Value, ) -> Result<()>
Validate spot + zipper, then commit both under one write lock.
On any validation error neither catalog is mutated.
pub fn symbol_id_for_symbol(&self, symbol: &str) -> Option<u32>
Sourcepub fn base_quantity_scale_for_symbol(&self, symbol: &str) -> Option<u32>
pub fn base_quantity_scale_for_symbol(&self, symbol: &str) -> Option<u32>
Returns the pair base quantity scale, or None when unknown/unhydrated.
Never invents scale 8 for missing symbols — callers that need a decode fallback must choose it explicitly.
pub fn base_quantity_scale_for_symbol_id(&self, id: u32) -> Option<u32>
Sourcepub fn quote_quantity_scale_for_symbol(&self, symbol: &str) -> Option<u32>
pub fn quote_quantity_scale_for_symbol(&self, symbol: &str) -> Option<u32>
Returns the pair quote quantity scale, or None when unknown/unhydrated.
Quote-debit budgets must use this scale. Callers must not infer it from the base quantity scale or from the quote asset’s display decimals.
pub fn quote_quantity_scale_for_symbol_id(&self, id: u32) -> Option<u32>
pub fn quantity_scale_for_zipped_asset_id(&self, id: u32) -> Option<u32>
pub fn orderbook_price_buckets_for_symbol(&self, symbol: &str) -> Vec<String>
pub fn ledger_id_for_asset(&self, symbol: &str) -> Option<u32>
Sourcepub fn supply_for_zipped_asset_id(&self, id: u32) -> Option<String>
pub fn supply_for_zipped_asset_id(&self, id: u32) -> Option<String>
Latest supply string for a zipped asset id, if patched from realtime updates.
Sourcepub fn patch_zipper_supply(&self, updates: &[ZippedAssetSupplyUpdate]) -> bool
pub fn patch_zipper_supply(&self, updates: &[ZippedAssetSupplyUpdate]) -> bool
Apply supply updates to the in-memory zipped_asset_id -> supply map.
Returns true when at least one entry changed. Unlike Go/Python, Rust
catalogs do not store full enriched zipper chain rows with a supply
field; this map is the live-supply source of truth.