Trait PathQuery

Source
pub trait PathQuery {
    // Required methods
    fn root(&self) -> impl Future<Output = Result<String>> + MaybeSend;
    fn query(
        &self,
        parent_id: &str,
        name: &str,
    ) -> impl Future<Output = Result<Option<String>>> + MaybeSend;
    fn create_dir(
        &self,
        parent_id: &str,
        name: &str,
    ) -> impl Future<Output = Result<String>> + MaybeSend;
}
Available on crate feature internal-path-cache only.
Expand description

The trait required for path cacher.

Required Methods§

Source

fn root(&self) -> impl Future<Output = Result<String>> + MaybeSend

Fetch the id for the root of the service.

Source

fn query( &self, parent_id: &str, name: &str, ) -> impl Future<Output = Result<Option<String>>> + MaybeSend

Query the id by parent_id and name.

Source

fn create_dir( &self, parent_id: &str, name: &str, ) -> impl Future<Output = Result<String>> + MaybeSend

Create a dir by parent_id and name.

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.

Implementors§