pub struct CompressionResult {
pub original_size: u64,
pub compressed_size: u64,
pub compression_ratio: f64,
pub compression_time: Duration,
}Expand description
Result of a compression operation containing metrics about the compression process.
This structure provides detailed information about the compression operation, including size metrics, compression ratio, and timing information.
Fields§
§original_size: u64The original size of the file before compression in bytes
compressed_size: u64The size of the compressed file in bytes
compression_ratio: f64The compression ratio (compressed_size / original_size) A value of 0.5 means the file was compressed to 50% of its original size
compression_time: DurationThe time taken to complete the compression operation
Trait Implementations§
Source§impl Clone for CompressionResult
impl Clone for CompressionResult
Source§fn clone(&self) -> CompressionResult
fn clone(&self) -> CompressionResult
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CompressionResult
impl RefUnwindSafe for CompressionResult
impl Send for CompressionResult
impl Sync for CompressionResult
impl Unpin for CompressionResult
impl UnwindSafe for CompressionResult
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