pub struct CompressionRegistry { /* private fields */ }Expand description
Registry that tracks which compression algorithms are available at runtime and which one is the default.
Implementations§
Source§impl CompressionRegistry
impl CompressionRegistry
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new registry with all feature-enabled algorithms
and None as the default.
Sourcepub fn with_default(algo: CompressionType) -> Result<Self, String>
pub fn with_default(algo: CompressionType) -> Result<Self, String>
Create a registry with a specific default algorithm.
The available list is still populated from enabled features.
Returns an error string if algo is not in the available set.
Sourcepub fn default_type(&self) -> CompressionType
pub fn default_type(&self) -> CompressionType
The default compression type.
Sourcepub fn available_types(&self) -> &[CompressionType]
pub fn available_types(&self) -> &[CompressionType]
All compression types currently available.
Sourcepub fn is_available(&self, algo: &CompressionType) -> bool
pub fn is_available(&self, algo: &CompressionType) -> bool
Check whether a given compression type is available.
Trait Implementations§
Source§impl Clone for CompressionRegistry
impl Clone for CompressionRegistry
Source§fn clone(&self) -> CompressionRegistry
fn clone(&self) -> CompressionRegistry
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 CompressionRegistry
impl Debug for CompressionRegistry
Auto Trait Implementations§
impl Freeze for CompressionRegistry
impl RefUnwindSafe for CompressionRegistry
impl Send for CompressionRegistry
impl Sync for CompressionRegistry
impl Unpin for CompressionRegistry
impl UnsafeUnpin for CompressionRegistry
impl UnwindSafe for CompressionRegistry
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