Skip to main content

HistoryStorage

Trait HistoryStorage 

Source
pub trait HistoryStorage: Send + Sync {
    // Required methods
    fn save(&self, result: &TestResult) -> Result<(), Error>;
    fn load_history(&self, limit: usize) -> Result<Vec<TestResult>, Error>;
    fn clear_history(&self) -> Result<(), Error>;
}
Expand description

Combined trait for storage that supports both saving and loading. Provides cleaner dependency injection than separate traits.

Required Methods§

Source

fn save(&self, result: &TestResult) -> Result<(), Error>

Source

fn load_history(&self, limit: usize) -> Result<Vec<TestResult>, Error>

Source

fn clear_history(&self) -> Result<(), Error>

Implementors§