Skip to main content

Storage

Trait Storage 

Source
pub trait Storage {
    // Required methods
    fn load(&self) -> Result<Vec<Task>>;
    fn save(&self, tasks: &[Task]) -> Result<()>;
    fn location(&self) -> String;
}
Expand description

Trait defining storage operations for tasks

Required Methods§

Source

fn load(&self) -> Result<Vec<Task>>

Load all tasks from storage

Source

fn save(&self, tasks: &[Task]) -> Result<()>

Save all tasks to storage

Source

fn location(&self) -> String

Get the storage location description

Implementors§