pub trait Filesystem {
type File: AsyncRead + AsyncSeek + FileExt + Send + Sync + Unpin;
type OpenFile<'a>: Future<Output = Result<Self::File>> + Send + Sync + 'a
where Self: 'a;
type IsDir<'a>: Future<Output = Result<bool>> + Send + Sync + 'a
where Self: 'a;
type Metadata<'a>: Future<Output = Result<Metadata>> + Send + Sync + 'a
where Self: 'a;
// Required methods
fn open<'a>(&'a mut self, path: &'a Path) -> Self::OpenFile<'a>;
fn is_dir<'a>(&'a self, path: &'a Path) -> Self::IsDir<'a>;
fn metadata<'a>(&'a self, path: &'a Path) -> Self::Metadata<'a>;
}Expand description
Define a filesystem trait
Required Associated Types§
type File: AsyncRead + AsyncSeek + FileExt + Send + Sync + Unpin
type OpenFile<'a>: Future<Output = Result<Self::File>> + Send + Sync + 'a where Self: 'a
type IsDir<'a>: Future<Output = Result<bool>> + Send + Sync + 'a where Self: 'a
type Metadata<'a>: Future<Output = Result<Metadata>> + Send + Sync + 'a where Self: 'a
Required Methods§
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.