pub enum ArchiveFormat {
Tar,
Zip,
SevenZip,
Cpio,
Ar,
Iso,
Rar,
Cab,
Warc,
Mtree,
Unknown,
}Expand description
Archive container formats.
Variants§
Tar
POSIX tar archive.
Zip
ZIP archive.
SevenZip
7z archive.
Cpio
CPIO archive.
Ar
Unix ar archive.
Iso
ISO image.
Rar
RAR archive.
Cab
Microsoft Cabinet archive.
Warc
WARC or ARC web archive.
Mtree
mtree manifest.
Unknown
Unknown or intentionally unspecified archive format.
Implementations§
Source§impl ArchiveFormat
impl ArchiveFormat
Sourcepub const fn extension(self) -> Option<&'static str>
pub const fn extension(self) -> Option<&'static str>
Returns the most common file extension for this archive format.
Sourcepub fn from_label(input: &str) -> ArchiveFormat
pub fn from_label(input: &str) -> ArchiveFormat
Parses a stable format label.
Sourcepub fn from_extension(input: &str) -> ArchiveFormat
pub fn from_extension(input: &str) -> ArchiveFormat
Detects an archive format from a filename or extension.
Trait Implementations§
Source§impl Clone for ArchiveFormat
impl Clone for ArchiveFormat
Source§fn clone(&self) -> ArchiveFormat
fn clone(&self) -> ArchiveFormat
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 moreSource§impl Debug for ArchiveFormat
impl Debug for ArchiveFormat
Source§impl Default for ArchiveFormat
impl Default for ArchiveFormat
Source§fn default() -> ArchiveFormat
fn default() -> ArchiveFormat
Returns the “default value” for a type. Read more
Source§impl Display for ArchiveFormat
impl Display for ArchiveFormat
Source§impl FromStr for ArchiveFormat
impl FromStr for ArchiveFormat
Source§type Err = Infallible
type Err = Infallible
The associated error which can be returned from parsing.
Source§fn from_str(
input: &str,
) -> Result<ArchiveFormat, <ArchiveFormat as FromStr>::Err>
fn from_str( input: &str, ) -> Result<ArchiveFormat, <ArchiveFormat as FromStr>::Err>
Parses a string
s to return a value of this type. Read moreSource§impl Hash for ArchiveFormat
impl Hash for ArchiveFormat
Source§impl Ord for ArchiveFormat
impl Ord for ArchiveFormat
Source§fn cmp(&self, other: &ArchiveFormat) -> Ordering
fn cmp(&self, other: &ArchiveFormat) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ArchiveFormat
impl PartialEq for ArchiveFormat
Source§fn eq(&self, other: &ArchiveFormat) -> bool
fn eq(&self, other: &ArchiveFormat) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for ArchiveFormat
impl PartialOrd for ArchiveFormat
impl Copy for ArchiveFormat
impl Eq for ArchiveFormat
impl StructuralPartialEq for ArchiveFormat
Auto Trait Implementations§
impl Freeze for ArchiveFormat
impl RefUnwindSafe for ArchiveFormat
impl Send for ArchiveFormat
impl Sync for ArchiveFormat
impl Unpin for ArchiveFormat
impl UnsafeUnpin for ArchiveFormat
impl UnwindSafe for ArchiveFormat
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