EntrySaver

Trait EntrySaver 

Source
pub trait EntrySaver {
    // Required method
    fn save(&mut self, name: &str, entry: SavingEntry<'_>) -> Result<()>;

    // Provided method
    fn save_entries(
        self,
        rx: impl IntoIterator<Item = NamedEntry>,
        ev: &mut ErrorCollector,
        cfgmap: &ConfigMap,
        ps: impl FnMut(ProgressState) -> Result<()>,
    ) -> Result<()>
       where Self: Sized { ... }
}
Expand description

Saves entries in a file-based system. Typically used with EntryReader.

Required Methods§

Source

fn save(&mut self, name: &str, entry: SavingEntry<'_>) -> Result<()>

Saves an entry.

Provided Methods§

Source

fn save_entries( self, rx: impl IntoIterator<Item = NamedEntry>, ev: &mut ErrorCollector, cfgmap: &ConfigMap, ps: impl FnMut(ProgressState) -> Result<()>, ) -> Result<()>
where Self: Sized,

Receives entries from rx, optimizes, sends progress (via ps), and saves them. Errors are collected with entry names.

Implementors§