pub struct FileCompressor { /* private fields */ }Expand description
File compressor for reducing storage space
Implementations§
Source§impl FileCompressor
impl FileCompressor
Sourcepub const fn new(config: StorageConfig) -> Self
pub const fn new(config: StorageConfig) -> Self
Create a new file compressor
Sourcepub async fn compress_file(
&self,
input_path: &Path,
output_path: &Path,
) -> Result<CompressionResult>
pub async fn compress_file( &self, input_path: &Path, output_path: &Path, ) -> Result<CompressionResult>
Compress a single file
Sourcepub async fn decompress_file(
&self,
input_path: &Path,
output_path: &Path,
) -> Result<DecompressionResult>
pub async fn decompress_file( &self, input_path: &Path, output_path: &Path, ) -> Result<DecompressionResult>
Decompress a file
Sourcepub async fn compress_old_files(&self) -> Result<CompressionSummary>
pub async fn compress_old_files(&self) -> Result<CompressionSummary>
Compress old files based on age threshold
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FileCompressor
impl RefUnwindSafe for FileCompressor
impl Send for FileCompressor
impl Sync for FileCompressor
impl Unpin for FileCompressor
impl UnwindSafe for FileCompressor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more