pub struct ArchiveEncoding {
pub archive: ArchiveFormat,
pub compression: CompressionFormat,
}Expand description
Archive container plus outer compression wrapper.
Fields§
§archive: ArchiveFormatArchive container format.
compression: CompressionFormatOuter compression format, if any.
Implementations§
Source§impl ArchiveEncoding
impl ArchiveEncoding
Sourcepub const fn new(archive: ArchiveFormat, compression: CompressionFormat) -> Self
pub const fn new(archive: ArchiveFormat, compression: CompressionFormat) -> Self
Creates an archive encoding from explicit parts.
Sourcepub fn from_extension(input: &str) -> Self
pub fn from_extension(input: &str) -> Self
Detects an archive encoding from a filename or extension.
Sourcepub fn from_filename(input: &str) -> Self
pub fn from_filename(input: &str) -> Self
Detects an archive encoding from a filename.
Sourcepub const fn has_archive(self) -> bool
pub const fn has_archive(self) -> bool
Returns whether the archive container is known.
Sourcepub const fn is_compressed(self) -> bool
pub const fn is_compressed(self) -> bool
Returns whether an outer compression wrapper is known.
Trait Implementations§
Source§impl Clone for ArchiveEncoding
impl Clone for ArchiveEncoding
Source§fn clone(&self) -> ArchiveEncoding
fn clone(&self) -> ArchiveEncoding
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 ArchiveEncoding
impl Debug for ArchiveEncoding
Source§impl Default for ArchiveEncoding
impl Default for ArchiveEncoding
Source§fn default() -> ArchiveEncoding
fn default() -> ArchiveEncoding
Returns the “default value” for a type. Read more
Source§impl Display for ArchiveEncoding
impl Display for ArchiveEncoding
Source§impl Hash for ArchiveEncoding
impl Hash for ArchiveEncoding
Source§impl Ord for ArchiveEncoding
impl Ord for ArchiveEncoding
Source§fn cmp(&self, other: &ArchiveEncoding) -> Ordering
fn cmp(&self, other: &ArchiveEncoding) -> 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 ArchiveEncoding
impl PartialEq for ArchiveEncoding
Source§fn eq(&self, other: &ArchiveEncoding) -> bool
fn eq(&self, other: &ArchiveEncoding) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for ArchiveEncoding
impl PartialOrd for ArchiveEncoding
impl Copy for ArchiveEncoding
impl Eq for ArchiveEncoding
impl StructuralPartialEq for ArchiveEncoding
Auto Trait Implementations§
impl Freeze for ArchiveEncoding
impl RefUnwindSafe for ArchiveEncoding
impl Send for ArchiveEncoding
impl Sync for ArchiveEncoding
impl Unpin for ArchiveEncoding
impl UnsafeUnpin for ArchiveEncoding
impl UnwindSafe for ArchiveEncoding
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