pub trait Extractor {
    // Required method
    fn extract(
        &self,
        package_data: Vec<u8>,
        target_path: &str
    ) -> Result<(), Error>;
}
Expand description

Extractor provides the ability to extract a previously downloaded package data.

Required Methods§

source

fn extract(&self, package_data: Vec<u8>, target_path: &str) -> Result<(), Error>

Extract extracts the configuration package’s content into the targetPath.

Arguments
  • package_data - configuration package data bytes.
  • target_path - path into which the extracted files from the package will be stored.
Returns
  • Ok(()) - successfully extracted packageData into the targetPath.
  • Err(Error) - error indicating what went wrong.

Implementors§