pub trait Packer: Send + Sync {
    // Required methods
    fn pack_name(&self) -> &'static str;
    fn do_pack(
        &self,
        log_file: File,
        log_file_path: &str
    ) -> Result<bool, LogError>;

    // Provided methods
    fn retry(&self) -> i32 { ... }
    fn log_name_create(&self, first_file_path: &str) -> String { ... }
}
Expand description

.zip or .lz4 or any one packer

Required Methods§

source

fn pack_name(&self) -> &'static str

source

fn do_pack(&self, log_file: File, log_file_path: &str) -> Result<bool, LogError>

Provided Methods§

source

fn retry(&self) -> i32

default 0 is not retry pack. if retry > 0 ,it will trying rePack

source

fn log_name_create(&self, first_file_path: &str) -> String

Implementors§