Skip to main content

MountedFileSystem

Trait MountedFileSystem 

Source
pub trait MountedFileSystem: Send + Sync {
    // Required methods
    fn capabilities(&self) -> FsCapabilities;
    fn metadata<'life0, 'life1, 'async_trait>(
        &'life0 self,
        path: &'life1 MountPath,
    ) -> Pin<Box<dyn Future<Output = FsResult<FsMetadata>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn open<'life0, 'life1, 'async_trait>(
        &'life0 self,
        path: &'life1 MountPath,
        options: FsOpenOptions,
    ) -> Pin<Box<dyn Future<Output = FsResult<Arc<dyn MountedFile>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn open_directory<'life0, 'life1, 'async_trait>(
        &'life0 self,
        path: &'life1 MountPath,
    ) -> Pin<Box<dyn Future<Output = FsResult<Box<dyn MountedDirectory>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn set_metadata<'life0, 'life1, 'async_trait>(
        &'life0 self,
        path: &'life1 MountPath,
        metadata: FsSetMetadata,
    ) -> Pin<Box<dyn Future<Output = FsResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn mkdir<'life0, 'life1, 'async_trait>(
        &'life0 self,
        path: &'life1 MountPath,
    ) -> Pin<Box<dyn Future<Output = FsResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn remove<'life0, 'life1, 'async_trait>(
        &'life0 self,
        path: &'life1 MountPath,
        directory: bool,
    ) -> Pin<Box<dyn Future<Output = FsResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn rename<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        from: &'life1 MountPath,
        to: &'life2 MountPath,
        replace: bool,
    ) -> Pin<Box<dyn Future<Output = FsResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;

    // Provided methods
    fn check_available(&self) -> FsResult<()> { ... }
    fn space<'life0, 'life1, 'async_trait>(
        &'life0 self,
        _path: &'life1 MountPath,
    ) -> Pin<Box<dyn Future<Output = FsResult<FsSpace>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
}

Required Methods§

Source

fn capabilities(&self) -> FsCapabilities

Source

fn metadata<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 MountPath, ) -> Pin<Box<dyn Future<Output = FsResult<FsMetadata>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn open<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 MountPath, options: FsOpenOptions, ) -> Pin<Box<dyn Future<Output = FsResult<Arc<dyn MountedFile>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn open_directory<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 MountPath, ) -> Pin<Box<dyn Future<Output = FsResult<Box<dyn MountedDirectory>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn set_metadata<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 MountPath, metadata: FsSetMetadata, ) -> Pin<Box<dyn Future<Output = FsResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn mkdir<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 MountPath, ) -> Pin<Box<dyn Future<Output = FsResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn remove<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 MountPath, directory: bool, ) -> Pin<Box<dyn Future<Output = FsResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn rename<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, from: &'life1 MountPath, to: &'life2 MountPath, replace: bool, ) -> Pin<Box<dyn Future<Output = FsResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Provided Methods§

Source

fn check_available(&self) -> FsResult<()>

Cheap lifecycle check, including heartbeats that perform no file I/O.

Source

fn space<'life0, 'life1, 'async_trait>( &'life0 self, _path: &'life1 MountPath, ) -> Pin<Box<dyn Future<Output = FsResult<FsSpace>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§