pub struct ImageMetrics {
pub image_index: usize,
pub original_width: u32,
pub original_height: u32,
pub transformed_width: u32,
pub transformed_height: u32,
pub original_bytes: usize,
pub transformed_bytes: usize,
pub format_before: String,
pub format_after: String,
pub tokens_before: TokenEstimate,
pub tokens_after: TokenEstimate,
}Expand description
Per-image before/after metrics for the report.
Fields§
§image_index: usizeIndex in the original payload
original_width: u32Original dimensions
original_height: u32§transformed_width: u32Transformed dimensions (same as original if unchanged)
transformed_height: u32§original_bytes: usizeOriginal byte size of the raw image
transformed_bytes: usizeTransformed byte size
format_before: StringFormat before transformation (e.g. “png”, “jpeg”, “svg”)
format_after: StringFormat after transformation
tokens_before: TokenEstimateEstimated tokens before transformation
tokens_after: TokenEstimateEstimated tokens after transformation
Trait Implementations§
Source§impl Clone for ImageMetrics
impl Clone for ImageMetrics
Source§fn clone(&self) -> ImageMetrics
fn clone(&self) -> ImageMetrics
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 ImageMetrics
impl Debug for ImageMetrics
Source§impl<'de> Deserialize<'de> for ImageMetrics
impl<'de> Deserialize<'de> for ImageMetrics
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ImageMetrics
impl RefUnwindSafe for ImageMetrics
impl Send for ImageMetrics
impl Sync for ImageMetrics
impl Unpin for ImageMetrics
impl UnsafeUnpin for ImageMetrics
impl UnwindSafe for ImageMetrics
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