pub struct TileEncodeStats {
pub total_bytes: usize,
pub min_tile_bytes: usize,
pub max_tile_bytes: usize,
pub mean_tile_bytes: f64,
pub tile_count: usize,
}Expand description
Summary statistics over a completed parallel encode run.
Fields§
§total_bytes: usizeTotal encoded bytes across all tiles.
min_tile_bytes: usizeSmallest tile encoded size in bytes.
max_tile_bytes: usizeLargest tile encoded size in bytes.
mean_tile_bytes: f64Mean encoded bytes per tile.
tile_count: usizeNumber of tiles.
Implementations§
Source§impl TileEncodeStats
impl TileEncodeStats
Sourcepub fn from_results(results: &[TileResult]) -> Option<Self>
pub fn from_results(results: &[TileResult]) -> Option<Self>
Compute stats from a slice of TileResults.
Returns None if results is empty.
Sourcepub fn compression_ratio(&self, raw_luma_bytes: usize) -> Option<f64>
pub fn compression_ratio(&self, raw_luma_bytes: usize) -> Option<f64>
Compression ratio (encoded bytes / raw luma bytes).
Returns None if raw_luma_bytes is 0.
Trait Implementations§
Source§impl Clone for TileEncodeStats
impl Clone for TileEncodeStats
Source§fn clone(&self) -> TileEncodeStats
fn clone(&self) -> TileEncodeStats
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TileEncodeStats
impl Debug for TileEncodeStats
Source§impl Default for TileEncodeStats
impl Default for TileEncodeStats
Source§fn default() -> TileEncodeStats
fn default() -> TileEncodeStats
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TileEncodeStats
impl RefUnwindSafe for TileEncodeStats
impl Send for TileEncodeStats
impl Sync for TileEncodeStats
impl Unpin for TileEncodeStats
impl UnsafeUnpin for TileEncodeStats
impl UnwindSafe for TileEncodeStats
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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