pub trait FileOpener:
Send
+ Sync
+ 'static {
type File: IntoFileAccess;
type Future: Future<Output = Result<FileWithMetadata<Self::File>, Error>> + Send;
// Required method
fn open(&self, path: &Path) -> Self::Future;
}Expand description
Trait for a simple virtual filesystem layer.
There is only the open operation, hence the name FileOpener. In practice, open must also
collect some file metadata. (See the FileWithMetadata struct.)
Required Associated Types§
Sourcetype File: IntoFileAccess
type File: IntoFileAccess
File handle type.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".