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)>> + MaybeSend;
fn write(
&self,
path: &str,
args: OpWrite,
) -> impl Future<Output = Result<(RpWrite, Self::Writer)>> + MaybeSend;
fn delete(
&self,
) -> impl Future<Output = Result<(RpDelete, Self::Deleter)>> + MaybeSend;
fn list(
&self,
path: &str,
args: OpList,
) -> impl Future<Output = Result<(RpList, Self::Lister)>> + MaybeSend;
// Provided methods
fn info(&self) -> Arc<AccessorInfo> { ... }
fn create_dir(
&self,
path: &str,
args: OpCreateDir,
) -> impl Future<Output = Result<RpCreateDir>> + MaybeSend { ... }
fn copy(
&self,
from: &str,
to: &str,
args: OpCopy,
) -> impl Future<Output = Result<RpCopy>> + MaybeSend { ... }
fn rename(
&self,
from: &str,
to: &str,
args: OpRename,
) -> impl Future<Output = Result<RpRename>> + MaybeSend { ... }
fn stat(
&self,
path: &str,
args: OpStat,
) -> impl Future<Output = Result<RpStat>> + MaybeSend { ... }
fn presign(
&self,
path: &str,
args: OpPresign,
) -> impl Future<Output = Result<RpPresign>> + MaybeSend { ... }
}
Expand description
LayeredAccess is layered accessor that forward all not implemented method to inner.
Required Associated Types§
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)>> + MaybeSend
fn write( &self, path: &str, args: OpWrite, ) -> impl Future<Output = Result<(RpWrite, Self::Writer)>> + MaybeSend
fn delete( &self, ) -> impl Future<Output = Result<(RpDelete, Self::Deleter)>> + MaybeSend
fn list( &self, path: &str, args: OpList, ) -> impl Future<Output = Result<(RpList, Self::Lister)>> + MaybeSend
Provided Methods§
fn info(&self) -> Arc<AccessorInfo>
fn create_dir( &self, path: &str, args: OpCreateDir, ) -> impl Future<Output = Result<RpCreateDir>> + MaybeSend
fn copy( &self, from: &str, to: &str, args: OpCopy, ) -> impl Future<Output = Result<RpCopy>> + MaybeSend
fn rename( &self, from: &str, to: &str, args: OpRename, ) -> impl Future<Output = Result<RpRename>> + MaybeSend
fn stat( &self, path: &str, args: OpStat, ) -> impl Future<Output = Result<RpStat>> + MaybeSend
fn presign( &self, path: &str, args: OpPresign, ) -> impl Future<Output = Result<RpPresign>> + 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.