Skip to main content

RecentsStore

Trait RecentsStore 

pub trait RecentsStore {
    // Required methods
    fn load(&self) -> Vec<String>;
    fn save(&self, items: &[String]);
}
Expand description

Where a program keeps the person’s recents between runs: on the device only, never in a shared record. Without one they last as long as the program.

Required Methods§

fn load(&self) -> Vec<String>

What is kept, most recent first; nothing kept reads as none.

fn save(&self, items: &[String])

Keep items (most recent first) in place of what was kept.

Implementors§