pub struct PersistenceConfig {
pub enabled: bool,
pub trades: bool,
pub agg_trades: bool,
pub klines: bool,
pub tickers: bool,
pub orderbook_snapshots: bool,
pub mark_price: bool,
pub funding_rate: bool,
pub open_interest: bool,
pub liquidations: bool,
}Expand description
Per-kind persistence toggles. Master enabled gates everything.
Fields§
§enabled: bool§trades: bool§agg_trades: bool§klines: bool§tickers: bool§orderbook_snapshots: bool§mark_price: bool§funding_rate: bool§open_interest: bool§liquidations: boolImplementations§
Source§impl PersistenceConfig
impl PersistenceConfig
pub fn trades(self, on: bool) -> Self
pub fn agg_trades(self, on: bool) -> Self
pub fn klines(self, on: bool) -> Self
pub fn tickers(self, on: bool) -> Self
pub fn orderbook_snapshots(self, on: bool) -> Self
pub fn mark_price(self, on: bool) -> Self
pub fn funding_rate(self, on: bool) -> Self
pub fn open_interest(self, on: bool) -> Self
pub fn liquidations(self, on: bool) -> Self
Sourcepub fn is_enabled_for(&self, kind: &Kind) -> bool
pub fn is_enabled_for(&self, kind: &Kind) -> bool
Should kind be persisted given the current config?
Trait Implementations§
Source§impl Clone for PersistenceConfig
impl Clone for PersistenceConfig
Source§fn clone(&self) -> PersistenceConfig
fn clone(&self) -> PersistenceConfig
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 PersistenceConfig
impl Debug for PersistenceConfig
Source§impl Default for PersistenceConfig
impl Default for PersistenceConfig
Source§impl<'de> Deserialize<'de> for PersistenceConfig
impl<'de> Deserialize<'de> for PersistenceConfig
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 PersistenceConfig
impl RefUnwindSafe for PersistenceConfig
impl Send for PersistenceConfig
impl Sync for PersistenceConfig
impl Unpin for PersistenceConfig
impl UnsafeUnpin for PersistenceConfig
impl UnwindSafe for PersistenceConfig
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