pub struct Backend<S: Adapter> { /* private fields */ }
Expand description
Backend of kv service. If the storage service is one k-v-like service, it should implement this kv Backend
by right.
Backend
implements one general logic on how to read, write, scan the data from one kv store efficiently.
And the Adapter
held by Backend
will handle how to communicate with one k-v-like service really and provides
a series of basic operation for this service.
OpenDAL developer can implement one new k-v store backend easily with help of this Backend.
Implementations§
Trait Implementations§
Source§impl<S: Adapter> Access for Backend<S>
impl<S: Adapter> Access for Backend<S>
Source§type Lister = HierarchyLister<KvLister<<S as Adapter>::Scanner>>
type Lister = HierarchyLister<KvLister<<S as Adapter>::Scanner>>
Lister is the associated lister returned in
list
operation.Source§type Deleter = OneShotDeleter<KvDeleter<S>>
type Deleter = OneShotDeleter<KvDeleter<S>>
Deleter is the associated deleter returned in
delete
operation.Source§fn info(&self) -> Arc<AccessorInfo>
fn info(&self) -> Arc<AccessorInfo>
Invoke the
info
operation to get metadata of accessor. Read moreSource§async fn stat(&self, path: &str, _: OpStat) -> Result<RpStat>
async fn stat(&self, path: &str, _: OpStat) -> Result<RpStat>
Invoke the
stat
operation on the specified path. Read moreSource§async fn write(&self, path: &str, _: OpWrite) -> Result<(RpWrite, Self::Writer)>
async fn write(&self, path: &str, _: OpWrite) -> Result<(RpWrite, Self::Writer)>
Invoke the
write
operation on the specified path, returns a
written size if operate successful. Read moreSource§async fn delete(&self) -> Result<(RpDelete, Self::Deleter)>
async fn delete(&self) -> Result<(RpDelete, Self::Deleter)>
Invoke the
delete
operation on the specified path. Read moreSource§async fn list(&self, path: &str, args: OpList) -> Result<(RpList, Self::Lister)>
async fn list(&self, path: &str, args: OpList) -> Result<(RpList, Self::Lister)>
Invoke the
list
operation on the specified path. Read moreSource§fn create_dir(
&self,
path: &str,
args: OpCreateDir,
) -> impl Future<Output = Result<RpCreateDir>> + MaybeSend
fn create_dir( &self, path: &str, args: OpCreateDir, ) -> impl Future<Output = Result<RpCreateDir>> + MaybeSend
Invoke the
create
operation on the specified path Read moreSource§fn copy(
&self,
from: &str,
to: &str,
args: OpCopy,
) -> impl Future<Output = Result<RpCopy>> + MaybeSend
fn copy( &self, from: &str, to: &str, args: OpCopy, ) -> impl Future<Output = Result<RpCopy>> + MaybeSend
Auto Trait Implementations§
impl<S> Freeze for Backend<S>
impl<S> RefUnwindSafe for Backend<S>where
S: RefUnwindSafe,
impl<S> Send for Backend<S>
impl<S> Sync for Backend<S>
impl<S> Unpin for Backend<S>
impl<S> UnwindSafe for Backend<S>where
S: RefUnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ServiceExt for T
impl<T> ServiceExt for T
Source§fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
Apply a transformation to the response body. Read more
Source§fn decompression(self) -> Decompression<Self>where
Self: Sized,
fn decompression(self) -> Decompression<Self>where
Self: Sized,
Decompress response bodies. Read more
Source§fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
High level tracing that classifies responses using HTTP status codes. Read more
Source§fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
High level tracing that classifies responses using gRPC headers. Read more