pub struct CompressionProfiler {
pub default_profile: CompressionProfile,
}Expand description
Auto-select compression profiles based on file paths
Fields§
§default_profile: CompressionProfileDefault profile when no pattern matches
Implementations§
Source§impl CompressionProfiler
impl CompressionProfiler
Sourcepub fn with_default(default: CompressionProfile) -> Self
pub fn with_default(default: CompressionProfile) -> Self
Create a profiler with a custom default
Sourcepub fn for_path(&self, path: &str) -> CompressionProfile
pub fn for_path(&self, path: &str) -> CompressionProfile
Select compression profile based on file path
Sourcepub fn by_name(&self, name: &str) -> Option<CompressionProfile>
pub fn by_name(&self, name: &str) -> Option<CompressionProfile>
Get profile by name
Sourcepub fn estimate_compressed_size(
&self,
path: &str,
original_size: usize,
) -> usize
pub fn estimate_compressed_size( &self, path: &str, original_size: usize, ) -> usize
Estimate compressed size for planning
Trait Implementations§
Source§impl Clone for CompressionProfiler
impl Clone for CompressionProfiler
Source§fn clone(&self) -> CompressionProfiler
fn clone(&self) -> CompressionProfiler
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 CompressionProfiler
impl Debug for CompressionProfiler
Auto Trait Implementations§
impl Freeze for CompressionProfiler
impl RefUnwindSafe for CompressionProfiler
impl Send for CompressionProfiler
impl Sync for CompressionProfiler
impl Unpin for CompressionProfiler
impl UnwindSafe for CompressionProfiler
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