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 UnsafeUnpin 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