#[non_exhaustive]pub enum Compression {
None,
Zlib,
Lzo,
Zstd,
Other(u8),
}Expand description
The compression algorithm of an extent (btrfs_file_extent_item.compression).
Unknown values carry their raw byte so an unsupported codec is identifiable
(fail-loud: the offending value is shown, never dropped).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
None
0 — no compression; the extent bytes are the file bytes.
Zlib
1 — zlib (a plain zlib stream per extent; flate2).
Lzo
2 — LZO, in btrfs’s per-sector framing (lzo crate + framing).
Zstd
3 — zstd (one zstd frame per extent; ruzstd, pure-Rust).
Other(u8)
Any other BTRFS_COMPRESS_* value, carrying the raw byte.
Implementations§
Trait Implementations§
Source§impl Clone for Compression
impl Clone for Compression
Source§fn clone(&self) -> Compression
fn clone(&self) -> Compression
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 moreimpl Copy for Compression
Source§impl Debug for Compression
impl Debug for Compression
impl Eq for Compression
Source§impl PartialEq for Compression
impl PartialEq for Compression
impl StructuralPartialEq for Compression
Auto Trait Implementations§
impl Freeze for Compression
impl RefUnwindSafe for Compression
impl Send for Compression
impl Sync for Compression
impl Unpin for Compression
impl UnsafeUnpin for Compression
impl UnwindSafe for Compression
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