Storage

Trait Storage 

Source
pub trait Storage:
    Debug
    + Send
    + Sync {
    // Provided methods
    fn read_object(
        &self,
        _req: ReadObjectRequest,
        _options: RequestOptions,
    ) -> impl Future<Output = Result<ReadObjectResponse>> + Send { ... }
    fn write_object_buffered<P>(
        &self,
        _payload: P,
        _req: WriteObjectRequest,
        _options: RequestOptions,
    ) -> impl Future<Output = Result<Object>> + Send
       where P: StreamingSource + Send + Sync + 'static { ... }
    fn write_object_unbuffered<P>(
        &self,
        _payload: P,
        _req: WriteObjectRequest,
        _options: RequestOptions,
    ) -> impl Future<Output = Result<Object>> + Send
       where P: StreamingSource + Seek + Send + Sync + 'static { ... }
}
Expand description

Defines the trait used to implement crate::client::Storage.

Application developers may need to implement this trait to mock client::Storage. In other use-cases, application developers only use client::Storage and need not be concerned with this trait or its implementations.

Services gain new RPCs routinely. Consequently, this trait gains new methods too. To avoid breaking applications the trait provides a default implementation of each method. Most of these implementations just return an error.

Provided Methods§

Source

fn read_object( &self, _req: ReadObjectRequest, _options: RequestOptions, ) -> impl Future<Output = Result<ReadObjectResponse>> + Send

Source

fn write_object_buffered<P>( &self, _payload: P, _req: WriteObjectRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Object>> + Send
where P: StreamingSource + Send + Sync + 'static,

Source

fn write_object_unbuffered<P>( &self, _payload: P, _req: WriteObjectRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Object>> + Send
where P: StreamingSource + Seek + Send + Sync + 'static,

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.

Implementors§