Struct feattle::Disk [−][src]
pub struct Disk { /* fields omitted */ }
Expand description
Persist the data in the local filesystem, under a given directory.
At every save action, if the directory does not exist, it will be created.
Example
use feattle_core::{feattles, Feattles};
use feattle_sync::Disk;
feattles! {
struct MyToggles {
a: bool,
}
}
let my_toggles = MyToggles::new(Disk::new("some/local/directory"));
Implementations
Trait Implementations
Save current state of all feattles.
Load the current state of all feattles. With no previous state existed, Ok(None)
should be
returned. Read more
pub fn save_history<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 str,
value: &'life2 ValueHistory
) -> Pin<Box<dyn Future<Output = Result<(), <Disk as Persist>::Error>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Disk: 'async_trait,
pub fn save_history<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 str,
value: &'life2 ValueHistory
) -> Pin<Box<dyn Future<Output = Result<(), <Disk as Persist>::Error>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Disk: 'async_trait,
Save the full history of a single feattle.
Load the full history of a single feattle. With the feattle has no history, Ok(None)
should be returned. Read more
Auto Trait Implementations
impl RefUnwindSafe for Disk
impl UnwindSafe for Disk
Blanket Implementations
Mutably borrows from an owned value. Read more