Skip to main content

AccessDyn

Trait AccessDyn 

Source
pub trait AccessDyn:
    Send
    + Sync
    + Debug
    + Unpin {
    // Required methods
    fn info_dyn(&self) -> Arc<AccessorInfo> ;
    fn create_dir_dyn<'a>(
        &'a self,
        path: &'a str,
        args: OpCreateDir,
    ) -> BoxedFuture<'a, Result<RpCreateDir>>;
    fn stat_dyn<'a>(
        &'a self,
        path: &'a str,
        args: OpStat,
    ) -> BoxedFuture<'a, Result<RpStat>>;
    fn read_dyn<'a>(
        &'a self,
        path: &'a str,
        args: OpRead,
    ) -> BoxedFuture<'a, Result<(RpRead, Reader)>>;
    fn write_dyn<'a>(
        &'a self,
        path: &'a str,
        args: OpWrite,
    ) -> BoxedFuture<'a, Result<(RpWrite, Writer)>>;
    fn delete_dyn(&self) -> BoxedFuture<'_, Result<(RpDelete, Deleter)>>;
    fn list_dyn<'a>(
        &'a self,
        path: &'a str,
        args: OpList,
    ) -> BoxedFuture<'a, Result<(RpList, Lister)>>;
    fn copy_dyn<'a>(
        &'a self,
        from: &'a str,
        to: &'a str,
        args: OpCopy,
    ) -> BoxedFuture<'a, Result<RpCopy>>;
    fn rename_dyn<'a>(
        &'a self,
        from: &'a str,
        to: &'a str,
        args: OpRename,
    ) -> BoxedFuture<'a, Result<RpRename>>;
    fn presign_dyn<'a>(
        &'a self,
        path: &'a str,
        args: OpPresign,
    ) -> BoxedFuture<'a, Result<RpPresign>>;
}
Expand description

AccessDyn is the dyn version of Access make it possible to use as Box<dyn AccessDyn>.

Required Methods§

Source

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

Dyn version of Accessor::info

Source

fn create_dir_dyn<'a>( &'a self, path: &'a str, args: OpCreateDir, ) -> BoxedFuture<'a, Result<RpCreateDir>>

Dyn version of Accessor::create_dir

Source

fn stat_dyn<'a>( &'a self, path: &'a str, args: OpStat, ) -> BoxedFuture<'a, Result<RpStat>>

Dyn version of Accessor::stat

Source

fn read_dyn<'a>( &'a self, path: &'a str, args: OpRead, ) -> BoxedFuture<'a, Result<(RpRead, Reader)>>

Dyn version of Accessor::read

Source

fn write_dyn<'a>( &'a self, path: &'a str, args: OpWrite, ) -> BoxedFuture<'a, Result<(RpWrite, Writer)>>

Dyn version of Accessor::write

Source

fn delete_dyn(&self) -> BoxedFuture<'_, Result<(RpDelete, Deleter)>>

Dyn version of Accessor::delete

Source

fn list_dyn<'a>( &'a self, path: &'a str, args: OpList, ) -> BoxedFuture<'a, Result<(RpList, Lister)>>

Dyn version of Accessor::list

Source

fn copy_dyn<'a>( &'a self, from: &'a str, to: &'a str, args: OpCopy, ) -> BoxedFuture<'a, Result<RpCopy>>

Dyn version of Accessor::copy

Source

fn rename_dyn<'a>( &'a self, from: &'a str, to: &'a str, args: OpRename, ) -> BoxedFuture<'a, Result<RpRename>>

Dyn version of Accessor::rename

Source

fn presign_dyn<'a>( &'a self, path: &'a str, args: OpPresign, ) -> BoxedFuture<'a, Result<RpPresign>>

Dyn version of Accessor::presign

Trait Implementations§

Source§

impl Access for dyn AccessDyn

Source§

type Reader = Box<dyn ReadDyn>

Reader is the associated reader returned in read operation.
Source§

type Writer = Box<dyn WriteDyn>

Writer is the associated writer returned in write operation.
Source§

type Deleter = Box<dyn DeleteDyn>

Deleter is the associated deleter returned in delete operation.
Source§

type Lister = Box<dyn ListDyn>

Lister is the associated lister returned in list operation.
Source§

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

Invoke the info operation to get metadata of accessor. Read more
Source§

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

Invoke the create operation on the specified path Read more
Source§

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

Invoke the stat operation on the specified path. Read more
Source§

async fn read(&self, path: &str, args: OpRead) -> Result<(RpRead, Self::Reader)>

Invoke the read operation on the specified path, returns a Reader if operate successful. Read more
Source§

async fn write( &self, path: &str, args: OpWrite, ) -> Result<(RpWrite, Self::Writer)>

Invoke the write operation on the specified path, returns a written size if operate successful. Read more
Source§

async fn delete(&self) -> Result<(RpDelete, Self::Deleter)>

Invoke the delete operation on the specified path. Read more
Source§

async fn list(&self, path: &str, args: OpList) -> Result<(RpList, Self::Lister)>

Invoke the list operation on the specified path. Read more
Source§

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

Invoke the copy operation on the specified from path and to path. Read more
Source§

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

Invoke the rename operation on the specified from path and to path. Read more
Source§

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

Invoke the presign operation on the specified path. Read more

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<A> AccessDyn for A
where A: Access<Reader = Reader, Writer = Writer, Lister = Lister, Deleter = Deleter> + ?Sized,