Trait moras::interface::storage::BasicFile

source ·
pub trait BasicFile<D, H>: Send + Sync {
    // Required methods
    fn get_path(&self) -> &PathBuf;
    fn get_path_str(&self) -> String;
    fn is_dirty(&self) -> bool;
    fn set_dirty(&mut self, dirty: bool);
    fn to_string(&self) -> String;
    fn save(&mut self) -> Result<(), Box<dyn Error>>;
    fn get_raw(&mut self) -> &mut D;
    fn handle_modify(&mut self, history: &H) -> Result<(), Box<dyn Error>>;
}

Required Methods§

source

fn get_path(&self) -> &PathBuf

source

fn get_path_str(&self) -> String

source

fn is_dirty(&self) -> bool

source

fn set_dirty(&mut self, dirty: bool)

source

fn to_string(&self) -> String

source

fn save(&mut self) -> Result<(), Box<dyn Error>>

source

fn get_raw(&mut self) -> &mut D

source

fn handle_modify(&mut self, history: &H) -> Result<(), Box<dyn Error>>

Implementors§