DavFileSystem

Trait DavFileSystem 

Source
pub trait DavFileSystem: Send + Sync {
    // Required methods
    fn metadata<'a>(
        &'a self,
        path: &'a DavPath,
    ) -> FsFuture<'a, Box<dyn DavMetaData>>;
    fn create_dir<'a>(
        &'a self,
        path: &'a DavPath,
        credentials: DavMutationCredentials,
    ) -> FsFuture<'a, ()>;
    fn remove_dir<'a>(&'a self, path: &'a DavPath) -> FsFuture<'a, ()>;
    fn remove_file<'a>(&'a self, path: &'a DavPath) -> FsFuture<'a, ()>;
    fn rename<'a>(
        &'a self,
        from: &'a DavPath,
        to: &'a DavPath,
    ) -> FsFuture<'a, ()>;
    fn copy<'a>(
        &'a self,
        from: &'a DavPath,
        to: &'a DavPath,
    ) -> FsFuture<'a, ()>;

    // Provided methods
    fn get_quota(&self) -> FsFuture<'_, (u64, Option<u64>)> { ... }
    fn have_props<'a>(
        &'a self,
        _path: &'a DavPath,
    ) -> Pin<Box<dyn Future<Output = bool> + Send + 'a>> { ... }
    fn get_props<'a>(
        &'a self,
        _path: &'a DavPath,
        _do_content: bool,
    ) -> FsFuture<'a, Vec<DavProp>> { ... }
    fn get_props_many<'a>(
        &'a self,
        paths: &'a [DavPath],
        do_content: bool,
    ) -> FsFuture<'a, HashMap<DavPath, Vec<DavProp>>> { ... }
    fn patch_props<'a>(
        &'a self,
        _path: &'a DavPath,
        _patches: Vec<(bool, DavProp)>,
    ) -> FsFuture<'a, Vec<(StatusCode, DavProp)>> { ... }
}
Expand description

Canonical resource and dead-property backend port.

Required Methods§

Source

fn metadata<'a>( &'a self, path: &'a DavPath, ) -> FsFuture<'a, Box<dyn DavMetaData>>

Source

fn create_dir<'a>( &'a self, path: &'a DavPath, credentials: DavMutationCredentials, ) -> FsFuture<'a, ()>

Source

fn remove_dir<'a>(&'a self, path: &'a DavPath) -> FsFuture<'a, ()>

Source

fn remove_file<'a>(&'a self, path: &'a DavPath) -> FsFuture<'a, ()>

Source

fn rename<'a>(&'a self, from: &'a DavPath, to: &'a DavPath) -> FsFuture<'a, ()>

Source

fn copy<'a>(&'a self, from: &'a DavPath, to: &'a DavPath) -> FsFuture<'a, ()>

Provided Methods§

Source

fn get_quota(&self) -> FsFuture<'_, (u64, Option<u64>)>

Source

fn have_props<'a>( &'a self, _path: &'a DavPath, ) -> Pin<Box<dyn Future<Output = bool> + Send + 'a>>

Source

fn get_props<'a>( &'a self, _path: &'a DavPath, _do_content: bool, ) -> FsFuture<'a, Vec<DavProp>>

Source

fn get_props_many<'a>( &'a self, paths: &'a [DavPath], do_content: bool, ) -> FsFuture<'a, HashMap<DavPath, Vec<DavProp>>>

Serial fallback that calls DavFileSystem::get_props once per path.

Production adapters should override this method when the persistence layer supports a genuine batch query.

Source

fn patch_props<'a>( &'a self, _path: &'a DavPath, _patches: Vec<(bool, DavProp)>, ) -> FsFuture<'a, Vec<(StatusCode, DavProp)>>

Implementors§