pub enum CompressionLevel {
Light,
Medium,
Aggressive,
Custom(u8),
}Expand description
Compression level options
Variants§
Light
Light compression - remove unused parts only
Medium
Medium compression - compress images slightly
Aggressive
Aggressive compression - maximize size reduction
Custom(u8)
Custom compression with specific image quality
Implementations§
Source§impl CompressionLevel
impl CompressionLevel
Sourcepub fn image_quality(&self) -> u8
pub fn image_quality(&self) -> u8
Get image quality for this level (for JPEG compression)
Sourcepub fn should_resize_images(&self) -> bool
pub fn should_resize_images(&self) -> bool
Whether to resize large images
Sourcepub fn max_image_dimension(&self) -> u32
pub fn max_image_dimension(&self) -> u32
Maximum image dimension for this level
Trait Implementations§
Source§impl Clone for CompressionLevel
impl Clone for CompressionLevel
Source§fn clone(&self) -> CompressionLevel
fn clone(&self) -> CompressionLevel
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CompressionLevel
impl Debug for CompressionLevel
Source§impl Default for CompressionLevel
impl Default for CompressionLevel
Source§impl PartialEq for CompressionLevel
impl PartialEq for CompressionLevel
Source§fn eq(&self, other: &CompressionLevel) -> bool
fn eq(&self, other: &CompressionLevel) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for CompressionLevel
impl StructuralPartialEq for CompressionLevel
Auto Trait Implementations§
impl Freeze for CompressionLevel
impl RefUnwindSafe for CompressionLevel
impl Send for CompressionLevel
impl Sync for CompressionLevel
impl Unpin for CompressionLevel
impl UnsafeUnpin for CompressionLevel
impl UnwindSafe for CompressionLevel
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