use std::fmt;
#[derive(Debug, Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct Report {
pub fonts_removed: usize,
pub font_bytes: u64,
pub images_changed: usize,
pub images_converted: usize,
pub images_rotated: usize,
pub images_extracted: usize,
pub images_kept: usize,
pub images_failed: usize,
pub image_bytes_before: u64,
pub image_bytes_after: u64,
pub warnings: Vec<Warning>,
}
#[derive(Debug, Clone, PartialEq, Eq)]
#[non_exhaustive]
pub struct Warning {
pub entry: String,
pub message: String,
}
impl fmt::Display for Warning {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "{}: {}", self.entry, self.message)
}
}
#[derive(Debug, Clone, Copy, PartialEq)]
#[non_exhaustive]
pub struct Progress<'a> {
pub done: usize,
pub total: usize,
pub entry: &'a str,
}