pub struct S3CompatibleStore { /* private fields */ }Expand description
Generic S3-compatible blob store implementation
Implementations§
Source§impl S3CompatibleStore
impl S3CompatibleStore
pub async fn new(bucket: String) -> BlobResult<Self>
pub async fn with_config(bucket: String, config: S3Config) -> Self
Sourcepub fn add_metadata_to_request(
request: PutObjectFluentBuilder,
metadata: &BlobMetadata,
) -> PutObjectFluentBuilder
pub fn add_metadata_to_request( request: PutObjectFluentBuilder, metadata: &BlobMetadata, ) -> PutObjectFluentBuilder
Add metadata fields to S3 put request
Sourcepub fn extract_blob_metadata(head_result: &HeadObjectOutput) -> BlobMetadata
pub fn extract_blob_metadata(head_result: &HeadObjectOutput) -> BlobMetadata
Extract rich metadata from S3 head_object response
Trait Implementations§
Source§impl BlobStore for S3CompatibleStore
impl BlobStore for S3CompatibleStore
Source§fn put<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 str,
content_type: Option<&'life2 str>,
stream: ByteStream,
) -> Pin<Box<dyn Future<Output = BlobResult<PutResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn put<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 str,
content_type: Option<&'life2 str>,
stream: ByteStream,
) -> Pin<Box<dyn Future<Output = BlobResult<PutResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Store a blob from a stream
Source§fn put_with_metadata<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
key: &'life1 str,
content_type: Option<&'life2 str>,
filename: Option<&'life3 str>,
stream: ByteStream,
) -> Pin<Box<dyn Future<Output = BlobResult<PutResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn put_with_metadata<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
key: &'life1 str,
content_type: Option<&'life2 str>,
filename: Option<&'life3 str>,
stream: ByteStream,
) -> Pin<Box<dyn Future<Output = BlobResult<PutResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Store a blob from a stream with metadata
Source§fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
range: Option<ByteRange>,
) -> Pin<Box<dyn Future<Output = BlobResult<GetResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
range: Option<ByteRange>,
) -> Pin<Box<dyn Future<Output = BlobResult<GetResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get a blob as a stream, optionally with range support
Source§fn head<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = BlobResult<ObjectHead>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn head<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = BlobResult<ObjectHead>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get blob metadata without content
Source§fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = BlobResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = BlobResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Delete a blob
Source§fn list<'life0, 'life1, 'async_trait>(
&'life0 self,
prefix: Option<&'life1 str>,
limit: Option<usize>,
) -> Pin<Box<dyn Future<Output = BlobResult<Vec<BlobInfo>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list<'life0, 'life1, 'async_trait>(
&'life0 self,
prefix: Option<&'life1 str>,
limit: Option<usize>,
) -> Pin<Box<dyn Future<Output = BlobResult<Vec<BlobInfo>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
List blobs with optional prefix filter
Source§fn capabilities(&self) -> StoreCapabilities
fn capabilities(&self) -> StoreCapabilities
Get store capabilities
Source§impl Clone for S3CompatibleStore
impl Clone for S3CompatibleStore
Source§fn clone(&self) -> S3CompatibleStore
fn clone(&self) -> S3CompatibleStore
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for S3CompatibleStore
impl !RefUnwindSafe for S3CompatibleStore
impl Send for S3CompatibleStore
impl Sync for S3CompatibleStore
impl Unpin for S3CompatibleStore
impl !UnwindSafe for S3CompatibleStore
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.