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,
    ) -> Pin<Box<dyn Future<Output = Result<RpCreateDir, Error>> + Send + 'a>>;
    fn stat_dyn<'a>(
        &'a self,
        path: &'a str,
        args: OpStat,
    ) -> Pin<Box<dyn Future<Output = Result<RpStat, Error>> + Send + 'a>>;
    fn read_dyn<'a>(
        &'a self,
        path: &'a str,
        args: OpRead,
    ) -> Pin<Box<dyn Future<Output = Result<(RpRead, Box<dyn ReadDyn>), Error>> + Send + 'a>>;
    fn write_dyn<'a>(
        &'a self,
        path: &'a str,
        args: OpWrite,
    ) -> Pin<Box<dyn Future<Output = Result<(RpWrite, Box<dyn WriteDyn>), Error>> + Send + 'a>>;
    fn delete_dyn(
        &self,
    ) -> Pin<Box<dyn Future<Output = Result<(RpDelete, Box<dyn DeleteDyn>), Error>> + Send + '_>>;
    fn list_dyn<'a>(
        &'a self,
        path: &'a str,
        args: OpList,
    ) -> Pin<Box<dyn Future<Output = Result<(RpList, Box<dyn ListDyn>), Error>> + Send + 'a>>;
    fn copy_dyn<'a>(
        &'a self,
        from: &'a str,
        to: &'a str,
        args: OpCopy,
    ) -> Pin<Box<dyn Future<Output = Result<RpCopy, Error>> + Send + 'a>>;
    fn rename_dyn<'a>(
        &'a self,
        from: &'a str,
        to: &'a str,
        args: OpRename,
    ) -> Pin<Box<dyn Future<Output = Result<RpRename, Error>> + Send + 'a>>;
    fn presign_dyn<'a>(
        &'a self,
        path: &'a str,
        args: OpPresign,
    ) -> Pin<Box<dyn Future<Output = Result<RpPresign, Error>> + Send + 'a>>;
}
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, ) -> Pin<Box<dyn Future<Output = Result<RpCreateDir, Error>> + Send + 'a>>

Dyn version of Accessor::create_dir

Source

fn stat_dyn<'a>( &'a self, path: &'a str, args: OpStat, ) -> Pin<Box<dyn Future<Output = Result<RpStat, Error>> + Send + 'a>>

Dyn version of Accessor::stat

Source

fn read_dyn<'a>( &'a self, path: &'a str, args: OpRead, ) -> Pin<Box<dyn Future<Output = Result<(RpRead, Box<dyn ReadDyn>), Error>> + Send + 'a>>

Dyn version of Accessor::read

Source

fn write_dyn<'a>( &'a self, path: &'a str, args: OpWrite, ) -> Pin<Box<dyn Future<Output = Result<(RpWrite, Box<dyn WriteDyn>), Error>> + Send + 'a>>

Dyn version of Accessor::write

Source

fn delete_dyn( &self, ) -> Pin<Box<dyn Future<Output = Result<(RpDelete, Box<dyn DeleteDyn>), Error>> + Send + '_>>

Dyn version of Accessor::delete

Source

fn list_dyn<'a>( &'a self, path: &'a str, args: OpList, ) -> Pin<Box<dyn Future<Output = Result<(RpList, Box<dyn ListDyn>), Error>> + Send + 'a>>

Dyn version of Accessor::list

Source

fn copy_dyn<'a>( &'a self, from: &'a str, to: &'a str, args: OpCopy, ) -> Pin<Box<dyn Future<Output = Result<RpCopy, Error>> + Send + 'a>>

Dyn version of Accessor::copy

Source

fn rename_dyn<'a>( &'a self, from: &'a str, to: &'a str, args: OpRename, ) -> Pin<Box<dyn Future<Output = Result<RpRename, Error>> + Send + 'a>>

Dyn version of Accessor::rename

Source

fn presign_dyn<'a>( &'a self, path: &'a str, args: OpPresign, ) -> Pin<Box<dyn Future<Output = Result<RpPresign, Error>> + Send + 'a>>

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, Error>

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

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

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

async fn read( &self, path: &str, args: OpRead, ) -> Result<(RpRead, <dyn AccessDyn as Access>::Reader), Error>

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, <dyn AccessDyn as Access>::Writer), Error>

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

async fn delete( &self, ) -> Result<(RpDelete, <dyn AccessDyn as Access>::Deleter), Error>

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

async fn list( &self, path: &str, args: OpList, ) -> Result<(RpList, <dyn AccessDyn as Access>::Lister), Error>

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

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

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, Error>

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, Error>

Invoke the presign operation on the specified path. Read more

Implementors§

Source§

impl<A> AccessDyn for A
where A: Access<Reader = Box<dyn ReadDyn>, Writer = Box<dyn WriteDyn>, Lister = Box<dyn ListDyn>, Deleter = Box<dyn DeleteDyn>> + ?Sized,