pub struct AnalysisOptions {Show 16 fields
pub qualities: Vec<u8>,
pub include_ignored: bool,
pub jobs: usize,
pub min_input_bytes: u64,
pub min_savings_bytes: u64,
pub probe_only: bool,
pub max_alpha_error: f32,
pub min_score: f64,
pub max_pixels: usize,
pub png_level: u8,
pub png_reductions: bool,
pub webp: bool,
pub lossy_png: bool,
pub heic_near_lossless: bool,
pub android_min_sdk: Option<u32>,
pub cache_dir: Option<PathBuf>,
}Fields§
§qualities: Vec<u8>Encoder quality parameters for lossy candidates; not savings percentages.
include_ignored: bool§jobs: usizeParallel image workers; 0 selects the CPU count, capped at 8.
min_input_bytes: u64All sizes are included by default, unlike the legacy lossless plan.
min_savings_bytes: u64§probe_only: bool§max_alpha_error: f32Lossy HEIC may quantize alpha. 0 requires exact alpha samples.
min_score: f64Lowest SSIMULACRA2 score a lossy candidate may have and still be recommended. Lower-scoring candidates are kept as reviewable warnings.
max_pixels: usizeLargest decoded image analyzed; each pixel costs 16 bytes per decode.
png_level: u8oxipng effort for the lossless PNG candidate.
png_reductions: boolAllow lossless PNG color-type, bit-depth and palette reductions.
webp: boolCompare WebP candidates for loose files and Android resources. On by default; asset-catalog renditions never receive WebP.
lossy_png: boolCompare lossy PNG candidates (palette quantization) for PNG sources. The file stays a PNG, so names, references and decoders are unaffected.
heic_near_lossless: boolAlso try HEIC at encoder quality 100. Apple’s encoder has no lossless mode, so this is its closest setting: still lossy, and labelled so.
android_min_sdk: Option<u32>Overrides the minSdk detected from Gradle files.
cache_dir: Option<PathBuf>Persistent result cache directory. None disables the cache; the CLI
passes the per-user cache directory unless --no-cache is given.
Trait Implementations§
Source§impl Clone for AnalysisOptions
impl Clone for AnalysisOptions
Source§fn clone(&self) -> AnalysisOptions
fn clone(&self) -> AnalysisOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AnalysisOptions
impl Debug for AnalysisOptions
Source§impl Default for AnalysisOptions
impl Default for AnalysisOptions
Source§impl<'de> Deserialize<'de> for AnalysisOptionswhere
AnalysisOptions: Default,
impl<'de> Deserialize<'de> for AnalysisOptionswhere
AnalysisOptions: Default,
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>,
Auto Trait Implementations§
impl Freeze for AnalysisOptions
impl RefUnwindSafe for AnalysisOptions
impl Send for AnalysisOptions
impl Sync for AnalysisOptions
impl Unpin for AnalysisOptions
impl UnsafeUnpin for AnalysisOptions
impl UnwindSafe for AnalysisOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> ⓘ
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> ⓘ
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