pub trait IFilesystem {
// Required methods
fn descriptor(&self) -> FilesystemDescriptor;
fn stat<'a>(
&'a self,
context: FilesystemCallContext,
path: String,
) -> FilesystemFuture<'a, FilesystemEntry>;
fn read<'a>(
&'a self,
context: FilesystemCallContext,
path: String,
) -> FilesystemFuture<'a, Vec<u8>>;
fn write<'a>(
&'a self,
context: FilesystemCallContext,
path: String,
bytes: Vec<u8>,
options: WriteOptions,
mutation: FilesystemMutationContext,
) -> FilesystemFuture<'a, FilesystemMutation>;
fn entries_page<'a>(
&'a self,
context: FilesystemCallContext,
path: String,
request: FilesystemPageRequest,
) -> FilesystemFuture<'a, FilesystemEntryPage>;
fn mkdir<'a>(
&'a self,
context: FilesystemCallContext,
path: String,
options: MkdirOptions,
mutation: FilesystemMutationContext,
) -> FilesystemFuture<'a, FilesystemMutation>;
fn delete<'a>(
&'a self,
context: FilesystemCallContext,
path: String,
options: DeleteOptions,
mutation: FilesystemMutationContext,
) -> FilesystemFuture<'a, FilesystemMutation>;
fn copy<'a>(
&'a self,
context: FilesystemCallContext,
source: String,
target: String,
options: CopyOptions,
mutation: FilesystemMutationContext,
) -> FilesystemFuture<'a, FilesystemMutation>;
fn move_entry<'a>(
&'a self,
context: FilesystemCallContext,
source: String,
target: String,
options: MoveOptions,
mutation: FilesystemMutationContext,
) -> FilesystemFuture<'a, FilesystemMutation>;
fn close<'a>(
&'a self,
context: FilesystemCallContext,
) -> FilesystemFuture<'a, ()>;
// Provided method
fn capabilities(&self) -> FilesystemCapabilities { ... }
}Required Methods§
fn descriptor(&self) -> FilesystemDescriptor
fn stat<'a>( &'a self, context: FilesystemCallContext, path: String, ) -> FilesystemFuture<'a, FilesystemEntry>
fn read<'a>( &'a self, context: FilesystemCallContext, path: String, ) -> FilesystemFuture<'a, Vec<u8>>
fn write<'a>( &'a self, context: FilesystemCallContext, path: String, bytes: Vec<u8>, options: WriteOptions, mutation: FilesystemMutationContext, ) -> FilesystemFuture<'a, FilesystemMutation>
fn entries_page<'a>( &'a self, context: FilesystemCallContext, path: String, request: FilesystemPageRequest, ) -> FilesystemFuture<'a, FilesystemEntryPage>
fn mkdir<'a>( &'a self, context: FilesystemCallContext, path: String, options: MkdirOptions, mutation: FilesystemMutationContext, ) -> FilesystemFuture<'a, FilesystemMutation>
fn delete<'a>( &'a self, context: FilesystemCallContext, path: String, options: DeleteOptions, mutation: FilesystemMutationContext, ) -> FilesystemFuture<'a, FilesystemMutation>
fn copy<'a>( &'a self, context: FilesystemCallContext, source: String, target: String, options: CopyOptions, mutation: FilesystemMutationContext, ) -> FilesystemFuture<'a, FilesystemMutation>
fn move_entry<'a>( &'a self, context: FilesystemCallContext, source: String, target: String, options: MoveOptions, mutation: FilesystemMutationContext, ) -> FilesystemFuture<'a, FilesystemMutation>
fn close<'a>( &'a self, context: FilesystemCallContext, ) -> FilesystemFuture<'a, ()>
Provided Methods§
fn capabilities(&self) -> FilesystemCapabilities
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".