#[non_exhaustive]pub enum Format {
Gzip,
Bzip2,
TarGz,
TarBz2,
Tar,
Zip,
SevenZip,
Unknown,
}Expand description
A recognized packing format.
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.
Gzip
Bare gzip stream (a single compressed file, e.g. disk.dd.gz).
Bzip2
Bare bzip2 stream (a single compressed file, e.g. disk.dd.bz2).
TarGz
tar compressed with gzip (.tgz / .tar.gz) — a member list.
TarBz2
tar compressed with bzip2 (.tbz2 / .tar.bz2) — a member list.
Tar
Uncompressed tar (ustar/v7) — a member list. Detected by the ustar
magic at offset 257, so a bare-compressed tar peeled to its inner stream
is recognized regardless of its (now-stripped) name.
Zip
ZIP archive — a member list.
SevenZip
7-Zip archive — a member list.
Unknown
Not a recognized archive layer.
Implementations§
Source§impl Format
impl Format
Sourcepub fn is_compression_wrapper(self) -> bool
pub fn is_compression_wrapper(self) -> bool
A 1→1 bare compression wrapper that peels to a single inner byte stream.
Sourcepub fn is_archive(self) -> bool
pub fn is_archive(self) -> bool
A multi-member archive (tar / tar.gz / tar.bz2 / zip / 7z).
Trait Implementations§
impl Copy for Format
impl Eq for Format
impl StructuralPartialEq for Format
Auto Trait Implementations§
impl Freeze for Format
impl RefUnwindSafe for Format
impl Send for Format
impl Sync for Format
impl Unpin for Format
impl UnsafeUnpin for Format
impl UnwindSafe for Format
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