Struct opendal::raw::adapters::kv::Backend

source ·
pub struct Backend<S: Adapter> { /* private fields */ }
Expand description

Backend of kv service.

Implementations§

source§

impl<S> Backend<S>where S: Adapter,

source

pub fn new(kv: S) -> Self

Create a new kv backend.

source

pub fn with_root(self, root: &str) -> Self

Configure root within this backend.

Trait Implementations§

source§

impl<S: Adapter> Accessor for Backend<S>

§

type Reader = Cursor

Reader is the associated reader the could return in read operation.
§

type BlockingReader = Cursor

BlockingReader is the associated reader that could return in blocking_read operation.
§

type Pager = KvPager

Pager is the associated page that return in list operation.
§

type BlockingPager = KvPager

BlockingPager is the associated pager that could return in blocking_list operation.
source§

fn metadata(&self) -> AccessorMetadata

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

fn create<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 str, __arg2: OpCreate ) -> Pin<Box<dyn Future<Output = Result<RpCreate>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

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

fn blocking_create(&self, path: &str, _: OpCreate) -> Result<RpCreate>

Invoke the blocking_create operation on the specified path. Read more
source§

fn read<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 str, args: OpRead ) -> Pin<Box<dyn Future<Output = Result<(RpRead, Self::Reader)>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

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

fn blocking_read( &self, path: &str, args: OpRead ) -> Result<(RpRead, Self::BlockingReader)>

Invoke the blocking_read operation on the specified path. Read more
source§

fn write<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 str, args: OpWrite, r: Reader ) -> Pin<Box<dyn Future<Output = Result<RpWrite>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

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

fn blocking_write( &self, path: &str, args: OpWrite, r: BlockingReader ) -> Result<RpWrite>

Invoke the blocking_write operation on the specified path. Read more
source§

fn stat<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 str, __arg2: OpStat ) -> Pin<Box<dyn Future<Output = Result<RpStat>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

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

fn blocking_stat(&self, path: &str, _: OpStat) -> Result<RpStat>

Invoke the blocking_stat operation on the specified path. Read more
source§

fn delete<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 str, __arg2: OpDelete ) -> Pin<Box<dyn Future<Output = Result<RpDelete>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

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

fn blocking_delete(&self, path: &str, _: OpDelete) -> Result<RpDelete>

Invoke the blocking_delete operation on the specified path. Read more
source§

fn scan<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 str, __arg2: OpScan ) -> Pin<Box<dyn Future<Output = Result<(RpScan, Self::Pager)>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Invoke the scan operation on the specified path. Read more
source§

fn blocking_scan( &self, path: &str, _: OpScan ) -> Result<(RpScan, Self::BlockingPager)>

Invoke the blocking_scan operation on the specified path. Read more
source§

fn list<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 str, args: OpList ) -> Pin<Box<dyn Future<Output = Result<(RpList, Self::Pager)>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

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

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

Invoke the presign operation on the specified path. Read more
source§

fn batch<'life0, 'async_trait>( &'life0 self, args: OpBatch ) -> Pin<Box<dyn Future<Output = Result<RpBatch>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Invoke the batch operations.
source§

fn create_multipart<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 str, args: OpCreateMultipart ) -> Pin<Box<dyn Future<Output = Result<RpCreateMultipart>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Invoke the create_multipart operation on the specified path. Read more
source§

fn write_multipart<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 str, args: OpWriteMultipart, r: Reader ) -> Pin<Box<dyn Future<Output = Result<RpWriteMultipart>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Invoke the write_multipart operation on the specified path. Read more
source§

fn complete_multipart<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 str, args: OpCompleteMultipart ) -> Pin<Box<dyn Future<Output = Result<RpCompleteMultipart>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Invoke the complete_multipart operation on the specified path. Read more
source§

fn abort_multipart<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 str, args: OpAbortMultipart ) -> Pin<Box<dyn Future<Output = Result<RpAbortMultipart>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Invoke the abort_multipart operation on the specified path. Read more
source§

fn blocking_list( &self, path: &str, args: OpList ) -> Result<(RpList, Self::BlockingPager)>

Invoke the blocking_list operation on the specified path. Read more
source§

impl<S: Clone + Adapter> Clone for Backend<S>

source§

fn clone(&self) -> Backend<S>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<S: Debug + Adapter> Debug for Backend<S>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

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: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CompatExt for T

source§

fn compat(self) -> Compat<T>

Applies the Compat adapter by value. Read more
source§

fn compat_ref(&self) -> Compat<&T>

Applies the Compat adapter by shared reference. Read more
source§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the Compat adapter by mutable reference. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more