pub struct PackageOptimizer {
pub min_compression_size: u64,
pub min_compression_ratio: f64,
pub enable_deduplication: bool,
}Expand description
Package optimizer
Fields§
§min_compression_size: u64Minimum size threshold for compression (bytes)
min_compression_ratio: f64Minimum compression ratio to recommend
enable_deduplication: boolEnable resource deduplication
Implementations§
Source§impl PackageOptimizer
impl PackageOptimizer
Sourcepub fn analyze(&self, package: &Package) -> Result<OptimizationReport>
pub fn analyze(&self, package: &Package) -> Result<OptimizationReport>
Analyze package and generate optimization report
Sourcepub fn optimize(&self, package: &mut Package) -> Result<OptimizationReport>
pub fn optimize(&self, package: &mut Package) -> Result<OptimizationReport>
Apply optimizations to a package
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PackageOptimizer
impl RefUnwindSafe for PackageOptimizer
impl Send for PackageOptimizer
impl Sync for PackageOptimizer
impl Unpin for PackageOptimizer
impl UnsafeUnpin for PackageOptimizer
impl UnwindSafe for PackageOptimizer
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> 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