pub struct GzipFileSystem { /* private fields */ }Expand description
A virtual file system that transparently compresses/decompresses
files whose path ends in .gz.
Delegates actual I/O to an inner FileSystem (typically
LocalFileSystem) and wraps
the resulting reader/writer with gzip streaming.
§Example
use akar_common::file_system::{LocalFileSystem, VirtualFileSystemRegistry};
use akar_common::gzip_file_system::GzipFileSystem;
let vfs = VirtualFileSystemRegistry::new();
vfs.register_file_system(Box::new(GzipFileSystem::new(Box::new(LocalFileSystem))));Implementations§
Source§impl GzipFileSystem
impl GzipFileSystem
Sourcepub fn new(inner: Box<dyn FileSystem>) -> Self
pub fn new(inner: Box<dyn FileSystem>) -> Self
Create a gzip-wrapping file system over the given inner FS.
Trait Implementations§
Source§impl FileSystem for GzipFileSystem
impl FileSystem for GzipFileSystem
Auto Trait Implementations§
impl !RefUnwindSafe for GzipFileSystem
impl !UnwindSafe for GzipFileSystem
impl Freeze for GzipFileSystem
impl Send for GzipFileSystem
impl Sync for GzipFileSystem
impl Unpin for GzipFileSystem
impl UnsafeUnpin for GzipFileSystem
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more