mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-04-29 09:09:58 -07:00
general: snapshot
This commit is contained in:
@@ -11,7 +11,6 @@ use super::Amount;
|
||||
pub struct LiquidityClassification {
|
||||
illiquid: f64,
|
||||
liquid: f64,
|
||||
// highly_liquid: f64,
|
||||
}
|
||||
|
||||
impl LiquidityClassification {
|
||||
@@ -54,11 +53,7 @@ impl LiquidityClassification {
|
||||
unreachable!()
|
||||
}
|
||||
|
||||
Self {
|
||||
illiquid,
|
||||
liquid,
|
||||
// highly_liquid: 1.0 - liquid - illiquid,
|
||||
}
|
||||
Self { illiquid, liquid }
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
@@ -136,43 +131,3 @@ where
|
||||
self.highly_liquid -= rhs.highly_liquid;
|
||||
}
|
||||
}
|
||||
|
||||
// impl<T> SplitByLiquidity<T>
|
||||
// where
|
||||
// T: Default,
|
||||
// {
|
||||
// // pub fn get(&self, id: &LiquidityId) -> &T {
|
||||
// // match id {
|
||||
// // LiquidityId::All => &self.all,
|
||||
// // LiquidityId::Illiquid => &self.illiquid,
|
||||
// // LiquidityId::Liquid => &self.liquid,
|
||||
// // LiquidityId::HighlyLiquid => &self.highly_liquid,
|
||||
// // }
|
||||
// // }
|
||||
|
||||
// pub fn get_mut(&mut self, id: &LiquidityId) -> &mut T {
|
||||
// match id {
|
||||
// LiquidityId::All => &mut self.all,
|
||||
// LiquidityId::Illiquid => &mut self.illiquid,
|
||||
// LiquidityId::Liquid => &mut self.liquid,
|
||||
// LiquidityId::HighlyLiquid => &mut self.highly_liquid,
|
||||
// }
|
||||
// }
|
||||
|
||||
// pub fn as_vec(&self) -> Vec<(&T, LiquidityId)> {
|
||||
// vec![
|
||||
// (&self.all, LiquidityId::All),
|
||||
// (&self.illiquid, LiquidityId::Illiquid),
|
||||
// (&self.liquid, LiquidityId::Liquid),
|
||||
// (&self.highly_liquid, LiquidityId::HighlyLiquid),
|
||||
// ]
|
||||
// }
|
||||
// }
|
||||
|
||||
// #[derive(Debug, Clone, Copy)]
|
||||
// pub enum LiquidityId {
|
||||
// All,
|
||||
// Illiquid,
|
||||
// Liquid,
|
||||
// HighlyLiquid,
|
||||
// }
|
||||
|
||||
Reference in New Issue
Block a user