pub trait FsMetadata: BaseFsMetadata {
// Provided methods
fn fs_metadata(&self, path: impl AsRef<Path>) -> Result<Self::Metadata> { ... }
fn fs_symlink_metadata(
&self,
path: impl AsRef<Path>,
) -> Result<Self::Metadata> { ... }
fn fs_is_file(&self, path: impl AsRef<Path>) -> Result<bool> { ... }
fn fs_is_file_no_err(&self, path: impl AsRef<Path>) -> bool { ... }
fn fs_is_dir(&self, path: impl AsRef<Path>) -> Result<bool> { ... }
fn fs_is_dir_no_err(&self, path: impl AsRef<Path>) -> bool { ... }
fn fs_exists(&self, path: impl AsRef<Path>) -> Result<bool> { ... }
fn fs_exists_no_err(&self, path: impl AsRef<Path>) -> bool { ... }
fn fs_is_symlink(&self, path: impl AsRef<Path>) -> Result<bool> { ... }
fn fs_is_symlink_no_err(&self, path: impl AsRef<Path>) -> bool { ... }
}Expand description
These two functions are so cloesly related that it becomes verbose to separate them out into two traits.
Provided Methods§
fn fs_metadata(&self, path: impl AsRef<Path>) -> Result<Self::Metadata>
fn fs_symlink_metadata(&self, path: impl AsRef<Path>) -> Result<Self::Metadata>
fn fs_is_file(&self, path: impl AsRef<Path>) -> Result<bool>
fn fs_is_file_no_err(&self, path: impl AsRef<Path>) -> bool
fn fs_is_dir(&self, path: impl AsRef<Path>) -> Result<bool>
fn fs_is_dir_no_err(&self, path: impl AsRef<Path>) -> bool
fn fs_exists(&self, path: impl AsRef<Path>) -> Result<bool>
fn fs_exists_no_err(&self, path: impl AsRef<Path>) -> bool
fn fs_is_symlink(&self, path: impl AsRef<Path>) -> Result<bool>
fn fs_is_symlink_no_err(&self, path: impl AsRef<Path>) -> bool
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.