pub struct CompressionResult<S: CompressionResultState> {
pub compression: Compression,
pub compression_time: Option<Duration>,
pub decompression_time: Option<Duration>,
pub compressed_size: Option<usize>,
pub compression_ratio: Option<f64>,
pub percentage_of_original: Option<f64>,
/* private fields */
}
Fields§
§compression: Compression
§compression_time: Option<Duration>
§decompression_time: Option<Duration>
§compressed_size: Option<usize>
§compression_ratio: Option<f64>
§percentage_of_original: Option<f64>
Implementations§
Source§impl CompressionResult<Awaiting>
impl CompressionResult<Awaiting>
pub fn new(compression: Compression) -> Self
pub fn run(self, test_contents: &Vec<u8>) -> Result<CompressionResult<Finished>>
Source§impl CompressionResult<Finished>
impl CompressionResult<Finished>
pub fn conclude( compression: Compression, compression_time: Duration, decompression_time: Duration, compressed_size: usize, original_size: usize, ) -> Self
pub fn compression_type(&self) -> String
pub fn compression_format(&self) -> &str
pub fn summarize(&self) -> String
pub fn summarize_as_table(&self) -> String
pub fn cell_description_compressed_size() -> Cell
pub fn cell_compressed_size(&self) -> Cell
pub fn cell_description_compression_ratio() -> Cell
pub fn cell_compression_ratio(&self) -> Cell
pub fn cell_description_compression_level() -> Cell
pub fn cell_compression_level(&self) -> Option<Cell>
pub fn cell_description_percentage_of_original() -> Cell
pub fn cell_percentage_of_original(&self) -> Cell
pub fn cell_description_encode_decode_time() -> Cell
pub fn cell_encode_decode_time(&self) -> Cell
Trait Implementations§
Source§impl<S: Debug + CompressionResultState> Debug for CompressionResult<S>
impl<S: Debug + CompressionResultState> Debug for CompressionResult<S>
Source§impl<S: PartialEq + CompressionResultState> PartialEq for CompressionResult<S>
impl<S: PartialEq + CompressionResultState> PartialEq for CompressionResult<S>
impl<S: CompressionResultState> StructuralPartialEq for CompressionResult<S>
Auto Trait Implementations§
impl<S> Freeze for CompressionResult<S>
impl<S> RefUnwindSafe for CompressionResult<S>where
S: RefUnwindSafe,
impl<S> Send for CompressionResult<S>where
S: Send,
impl<S> Sync for CompressionResult<S>where
S: Sync,
impl<S> Unpin for CompressionResult<S>where
S: Unpin,
impl<S> UnwindSafe for CompressionResult<S>where
S: UnwindSafe,
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more