Struct virtual_fs::static_fs::StaticFileSystem
source · pub struct StaticFileSystem {
pub package: String,
pub volumes: Arc<IndexMap<String, Volume<'static>>>,
pub memory: Arc<FileSystem>,
}
Expand description
Custom file system wrapper to map requested file paths
Fields§
§package: String
§volumes: Arc<IndexMap<String, Volume<'static>>>
§memory: Arc<FileSystem>
Implementations§
Trait Implementations§
source§impl Debug for StaticFileSystem
impl Debug for StaticFileSystem
source§impl FileOpener for StaticFileSystem
impl FileOpener for StaticFileSystem
Custom file opener, returns a WebCFile
source§impl FileSystem for StaticFileSystem
impl FileSystem for StaticFileSystem
fn readlink(&self, path: &Path) -> Result<PathBuf>
fn read_dir(&self, path: &Path) -> Result<ReadDir, FsError>
fn create_dir(&self, path: &Path) -> Result<(), FsError>
fn remove_dir(&self, path: &Path) -> Result<(), FsError>
fn rename<'a>( &'a self, from: &'a Path, to: &'a Path, ) -> BoxFuture<'a, Result<(), FsError>>
fn metadata(&self, path: &Path) -> Result<Metadata, FsError>
fn remove_file(&self, path: &Path) -> Result<(), FsError>
fn new_open_options(&self) -> OpenOptions<'_>
source§fn symlink_metadata(&self, path: &Path) -> Result<Metadata, FsError>
fn symlink_metadata(&self, path: &Path) -> Result<Metadata, FsError>
This method gets metadata without following symlinks in the path.
Currently identical to
metadata
because symlinks aren’t implemented
yet.fn mount( &self, _name: String, _path: &Path, _fs: Box<dyn FileSystem + Send + Sync>, ) -> Result<(), FsError>
Auto Trait Implementations§
impl Freeze for StaticFileSystem
impl RefUnwindSafe for StaticFileSystem
impl Send for StaticFileSystem
impl Sync for StaticFileSystem
impl Unpin for StaticFileSystem
impl UnwindSafe for StaticFileSystem
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