Enum opendal::io_util::CompressAlgorithm
source · [−]pub enum CompressAlgorithm {
Brotli,
Bz2,
Deflate,
Gzip,
Lzma,
Xz,
Zlib,
Zstd,
}
Expand description
CompressAlgorithm represents all compress algorithm that OpenDAL supports.
Variants
Brotli
Brotli compression format.
Bz2
bzip2 compression format.
Deflate
Deflate Compressed Data Format.
Similar to CompressAlgorithm::Gzip
and CompressAlgorithm::Zlib
Gzip
Gzip compress format.
Similar to CompressAlgorithm::Deflate
and CompressAlgorithm::Zlib
Lzma
LZMA compress format.
Xz
Xz compress format, the successor of CompressAlgorithm::Lzma
.
Zlib
Zlib compress format.
Similar to CompressAlgorithm::Deflate
and CompressAlgorithm::Gzip
Zstd
Zstd compression algorithm
Implementations
sourceimpl CompressAlgorithm
impl CompressAlgorithm
sourcepub fn from_extension(ext: &str) -> Option<CompressAlgorithm>
pub fn from_extension(ext: &str) -> Option<CompressAlgorithm>
Create CompressAlgorithm from file extension.
If the file extension is not supported, None
will be return instead.
sourcepub fn from_path(path: &str) -> Option<CompressAlgorithm>
pub fn from_path(path: &str) -> Option<CompressAlgorithm>
Create CompressAlgorithm from file path.
If the extension in file path is not supported, None
will be return instead.
Trait Implementations
sourceimpl Clone for CompressAlgorithm
impl Clone for CompressAlgorithm
sourcefn clone(&self) -> CompressAlgorithm
fn clone(&self) -> CompressAlgorithm
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for CompressAlgorithm
impl Debug for CompressAlgorithm
sourceimpl From<CompressAlgorithm> for DecompressCodec
impl From<CompressAlgorithm> for DecompressCodec
sourcefn from(v: CompressAlgorithm) -> Self
fn from(v: CompressAlgorithm) -> Self
Converts to this type from the input type.
sourceimpl PartialEq<CompressAlgorithm> for CompressAlgorithm
impl PartialEq<CompressAlgorithm> for CompressAlgorithm
sourcefn eq(&self, other: &CompressAlgorithm) -> bool
fn eq(&self, other: &CompressAlgorithm) -> bool
impl Copy for CompressAlgorithm
impl Eq for CompressAlgorithm
impl StructuralEq for CompressAlgorithm
impl StructuralPartialEq for CompressAlgorithm
Auto Trait Implementations
impl RefUnwindSafe for CompressAlgorithm
impl Send for CompressAlgorithm
impl Sync for CompressAlgorithm
impl Unpin for CompressAlgorithm
impl UnwindSafe for CompressAlgorithm
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.