LayeredAccess

Trait LayeredAccess 

Source
pub trait LayeredAccess:
    Send
    + Sync
    + Debug
    + Unpin
    + 'static {
    type Inner: Access;
    type Reader: Read;
    type Writer: Write;
    type Lister: List;
    type Deleter: Delete;

    // Required methods
    fn inner(&self) -> &Self::Inner;
    fn read(
        &self,
        path: &str,
        args: OpRead,
    ) -> impl Future<Output = Result<(RpRead, Self::Reader), Error>> + MaybeSend;
    fn write(
        &self,
        path: &str,
        args: OpWrite,
    ) -> impl Future<Output = Result<(RpWrite, Self::Writer), Error>> + MaybeSend;
    fn delete(
        &self,
    ) -> impl Future<Output = Result<(RpDelete, Self::Deleter), Error>> + MaybeSend;
    fn list(
        &self,
        path: &str,
        args: OpList,
    ) -> impl Future<Output = Result<(RpList, Self::Lister), Error>> + MaybeSend;

    // Provided methods
    fn info(&self) -> Arc<AccessorInfo> { ... }
    fn create_dir(
        &self,
        path: &str,
        args: OpCreateDir,
    ) -> impl Future<Output = Result<RpCreateDir, Error>> + MaybeSend { ... }
    fn copy(
        &self,
        from: &str,
        to: &str,
        args: OpCopy,
    ) -> impl Future<Output = Result<RpCopy, Error>> + MaybeSend { ... }
    fn rename(
        &self,
        from: &str,
        to: &str,
        args: OpRename,
    ) -> impl Future<Output = Result<RpRename, Error>> + MaybeSend { ... }
    fn stat(
        &self,
        path: &str,
        args: OpStat,
    ) -> impl Future<Output = Result<RpStat, Error>> + MaybeSend { ... }
    fn presign(
        &self,
        path: &str,
        args: OpPresign,
    ) -> impl Future<Output = Result<RpPresign, Error>> + MaybeSend { ... }
}
Expand description

LayeredAccess is layered accessor that forward all not implemented method to inner.

Required Associated Types§

Required Methods§

Source

fn inner(&self) -> &Self::Inner

Source

fn read( &self, path: &str, args: OpRead, ) -> impl Future<Output = Result<(RpRead, Self::Reader), Error>> + MaybeSend

Source

fn write( &self, path: &str, args: OpWrite, ) -> impl Future<Output = Result<(RpWrite, Self::Writer), Error>> + MaybeSend

Source

fn delete( &self, ) -> impl Future<Output = Result<(RpDelete, Self::Deleter), Error>> + MaybeSend

Source

fn list( &self, path: &str, args: OpList, ) -> impl Future<Output = Result<(RpList, Self::Lister), Error>> + MaybeSend

Provided Methods§

Source

fn info(&self) -> Arc<AccessorInfo>

Source

fn create_dir( &self, path: &str, args: OpCreateDir, ) -> impl Future<Output = Result<RpCreateDir, Error>> + MaybeSend

Source

fn copy( &self, from: &str, to: &str, args: OpCopy, ) -> impl Future<Output = Result<RpCopy, Error>> + MaybeSend

Source

fn rename( &self, from: &str, to: &str, args: OpRename, ) -> impl Future<Output = Result<RpRename, Error>> + MaybeSend

Source

fn stat( &self, path: &str, args: OpStat, ) -> impl Future<Output = Result<RpStat, Error>> + MaybeSend

Source

fn presign( &self, path: &str, args: OpPresign, ) -> impl Future<Output = Result<RpPresign, Error>> + MaybeSend

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.

Implementations on Foreign Types§

§

impl<A, I> LayeredAccess for MetricsAccessor<A, I>
where A: Access, I: MetricsIntercept,

§

type Inner = A

§

type Reader = MetricsWrapper<<A as Access>::Reader, I>

§

type Writer = MetricsWrapper<<A as Access>::Writer, I>

§

type Lister = MetricsWrapper<<A as Access>::Lister, I>

§

type Deleter = MetricsWrapper<<A as Access>::Deleter, I>

§

fn inner(&self) -> &<MetricsAccessor<A, I> as LayeredAccess>::Inner

§

async fn create_dir( &self, path: &str, args: OpCreateDir, ) -> Result<RpCreateDir, Error>

§

async fn read( &self, path: &str, args: OpRead, ) -> Result<(RpRead, <MetricsAccessor<A, I> as LayeredAccess>::Reader), Error>

§

async fn write( &self, path: &str, args: OpWrite, ) -> Result<(RpWrite, <MetricsAccessor<A, I> as LayeredAccess>::Writer), Error>

§

async fn copy( &self, from: &str, to: &str, args: OpCopy, ) -> Result<RpCopy, Error>

§

async fn rename( &self, from: &str, to: &str, args: OpRename, ) -> Result<RpRename, Error>

§

async fn stat(&self, path: &str, args: OpStat) -> Result<RpStat, Error>

§

async fn delete( &self, ) -> Result<(RpDelete, <MetricsAccessor<A, I> as LayeredAccess>::Deleter), Error>

§

async fn list( &self, path: &str, args: OpList, ) -> Result<(RpList, <MetricsAccessor<A, I> as LayeredAccess>::Lister), Error>

§

async fn presign(&self, path: &str, args: OpPresign) -> Result<RpPresign, Error>

Implementors§