vedvaring

Trait Persist

Source
pub trait Persist: for<'a> Deserialize<'a> + Serialize {
    // Required methods
    fn name(&self) -> String;
    fn dir_name() -> String;

    // Provided methods
    fn dir() -> PathBuf { ... }
    fn path(&self) -> PathBuf { ... }
    fn save(&self) { ... }
    fn delete(self) { ... }
    fn open(&self) { ... }
    fn load_all() -> Vec<Self> { ... }
}

Required Methods§

Provided Methods§

Source

fn dir() -> PathBuf

Source

fn path(&self) -> PathBuf

Source

fn save(&self)

Source

fn delete(self)

Source

fn open(&self)

Source

fn load_all() -> Vec<Self>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§