pub struct HistoryConfig {
pub enabled: bool,
pub max_age_days: u32,
pub max_rows: u64,
pub path: Option<String>,
}Expand description
Configuration for the persistent query-history store at
~/.local/share/ferrule/history.db (R4 / #4).
Default-on. The FERRULE_NO_HISTORY env var kills recording for a
single invocation without touching this config.
Fields§
§enabled: bool§max_age_days: u32Open-loop retention: rows older than this many days are pruned
opportunistically on the next record() call. 0 disables age-based
pruning.
max_rows: u64Open-loop retention: cap on the total row count. 0 disables
count-based pruning. Pruning, when triggered, deletes the oldest
rows first.
path: Option<String>Path to the SQLite store. When None, defaults to
<XDG_DATA_HOME>/ferrule/history.db (Linux/macOS) or the platform
equivalent via dirs::data_local_dir().
Trait Implementations§
Source§impl Clone for HistoryConfig
impl Clone for HistoryConfig
Source§fn clone(&self) -> HistoryConfig
fn clone(&self) -> HistoryConfig
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 HistoryConfig
impl Debug for HistoryConfig
Source§impl Default for HistoryConfig
impl Default for HistoryConfig
Source§impl<'de> Deserialize<'de> for HistoryConfig
impl<'de> Deserialize<'de> for HistoryConfig
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 HistoryConfig
impl RefUnwindSafe for HistoryConfig
impl Send for HistoryConfig
impl Sync for HistoryConfig
impl Unpin for HistoryConfig
impl UnsafeUnpin for HistoryConfig
impl UnwindSafe for HistoryConfig
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