pub struct NullFs;
Expand description
A file system implementation that acts like it’s completely empty.
This may be useful for security as it denies all access to the file system (so @import
is
prevented from leaking anything); you’ll need to use from_string
for
this to make any sense (since from_path
would fail to find a file).
Trait Implementations§
source§impl Fs for NullFs
impl Fs for NullFs
source§fn is_file(&self, _path: &Path) -> bool
fn is_file(&self, _path: &Path) -> bool
Returns
true
if the path exists on disk and is pointing at a regular file.source§fn is_dir(&self, _path: &Path) -> bool
fn is_dir(&self, _path: &Path) -> bool
Returns
true
if the path exists on disk and is pointing at a directory.Auto Trait Implementations§
impl Freeze for NullFs
impl RefUnwindSafe for NullFs
impl Send for NullFs
impl Sync for NullFs
impl Unpin for NullFs
impl UnwindSafe for NullFs
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