Enum ArchiveFormat
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§
§impl ArchiveFormat
impl ArchiveFormat
pub 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.
pub fn from_label(input: &str) -> ArchiveFormat
pub fn from_label(input: &str) -> ArchiveFormat
Parses a stable format label.
pub fn from_extension(input: &str) -> ArchiveFormat
pub fn from_extension(input: &str) -> ArchiveFormat
Detects an archive format from a filename or extension.
Trait Implementations§
§impl Clone for ArchiveFormat
impl Clone for ArchiveFormat
§fn clone(&self) -> ArchiveFormat
fn clone(&self) -> ArchiveFormat
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 more§impl Debug for ArchiveFormat
impl Debug for ArchiveFormat
§impl Default for ArchiveFormat
impl Default for ArchiveFormat
§fn default() -> ArchiveFormat
fn default() -> ArchiveFormat
Returns the “default value” for a type. Read more
§impl Display for ArchiveFormat
impl Display for ArchiveFormat
§impl FromStr for ArchiveFormat
impl FromStr for ArchiveFormat
§type Err = Infallible
type Err = Infallible
The associated error which can be returned from parsing.
§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 more§impl Hash for ArchiveFormat
impl Hash for ArchiveFormat
§impl Ord for ArchiveFormat
impl Ord for ArchiveFormat
§impl PartialEq for ArchiveFormat
impl PartialEq for ArchiveFormat
§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