pub trait Store {
type Directory: StoreDirectory;
type File: StoreFile;
// Required methods
fn get_dir<P: Into<PathBuf>>(
&self,
path: P,
) -> impl Future<Output = Result<Self::Directory>>;
fn get_file<P: Into<PathBuf>>(
&self,
path: P,
) -> impl Future<Output = Result<Self::File>>;
// Provided method
fn root(&self) -> impl Future<Output = Result<Self::Directory>> { ... }
}
Expand description
Trait representing a generic storage system.
Required Associated Types§
Sourcetype Directory: StoreDirectory
type Directory: StoreDirectory
Associated type for directories in the storage system.
Required Methods§
Provided 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.