Trait mountpoint_s3_client::ObjectClient
source · pub trait ObjectClient {
type GetObjectResult: Stream<Item = ObjectClientResult<GetBodyPart, GetObjectError, Self::ClientError>> + Send;
type ClientError: Error + Send + Sync + 'static;
// Required methods
fn delete_object<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
bucket: &'life1 str,
key: &'life2 str
) -> Pin<Box<dyn Future<Output = ObjectClientResult<DeleteObjectResult, DeleteObjectError, Self::ClientError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn get_object<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
bucket: &'life1 str,
key: &'life2 str,
range: Option<Range<u64>>,
if_match: Option<ETag>
) -> Pin<Box<dyn Future<Output = ObjectClientResult<Self::GetObjectResult, GetObjectError, Self::ClientError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn list_objects<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
bucket: &'life1 str,
continuation_token: Option<&'life2 str>,
delimiter: &'life3 str,
max_keys: usize,
prefix: &'life4 str
) -> Pin<Box<dyn Future<Output = ObjectClientResult<ListObjectsResult, ListObjectsError, Self::ClientError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait;
fn head_object<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
bucket: &'life1 str,
key: &'life2 str
) -> Pin<Box<dyn Future<Output = ObjectClientResult<HeadObjectResult, HeadObjectError, Self::ClientError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn put_object<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
bucket: &'life1 str,
key: &'life2 str,
params: &'life3 PutObjectParams,
contents: impl 'async_trait + Stream<Item = impl 'async_trait + AsRef<[u8]> + Send> + Send
) -> Pin<Box<dyn Future<Output = ObjectClientResult<PutObjectResult, PutObjectError, Self::ClientError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn get_object_attributes<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
bucket: &'life1 str,
key: &'life2 str,
max_parts: Option<usize>,
part_number_marker: Option<usize>,
object_attributes: &'life3 [ObjectAttribute]
) -> Pin<Box<dyn Future<Output = ObjectClientResult<GetObjectAttributesResult, GetObjectAttributesError, Self::ClientError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
}Expand description
An ObjectClient is an S3-like blob storage interface
Required Associated Types§
type GetObjectResult: Stream<Item = ObjectClientResult<GetBodyPart, GetObjectError, Self::ClientError>> + Send
type ClientError: Error + Send + Sync + 'static
Required Methods§
sourcefn delete_object<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
bucket: &'life1 str,
key: &'life2 str
) -> Pin<Box<dyn Future<Output = ObjectClientResult<DeleteObjectResult, DeleteObjectError, Self::ClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn delete_object<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, bucket: &'life1 str, key: &'life2 str ) -> Pin<Box<dyn Future<Output = ObjectClientResult<DeleteObjectResult, DeleteObjectError, Self::ClientError>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,
Delete a single object from the object store.
DeleteObject will succeed even if the object within the bucket does not exist.
sourcefn get_object<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
bucket: &'life1 str,
key: &'life2 str,
range: Option<Range<u64>>,
if_match: Option<ETag>
) -> Pin<Box<dyn Future<Output = ObjectClientResult<Self::GetObjectResult, GetObjectError, Self::ClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_object<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, bucket: &'life1 str, key: &'life2 str, range: Option<Range<u64>>, if_match: Option<ETag> ) -> Pin<Box<dyn Future<Output = ObjectClientResult<Self::GetObjectResult, GetObjectError, Self::ClientError>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,
Get an object from the object store. Returns a stream of body parts of the object. Parts are guaranteed to be returned by the stream in order and contiguously.
sourcefn list_objects<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
bucket: &'life1 str,
continuation_token: Option<&'life2 str>,
delimiter: &'life3 str,
max_keys: usize,
prefix: &'life4 str
) -> Pin<Box<dyn Future<Output = ObjectClientResult<ListObjectsResult, ListObjectsError, Self::ClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn list_objects<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, bucket: &'life1 str, continuation_token: Option<&'life2 str>, delimiter: &'life3 str, max_keys: usize, prefix: &'life4 str ) -> Pin<Box<dyn Future<Output = ObjectClientResult<ListObjectsResult, ListObjectsError, Self::ClientError>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,
List the objects in a bucket under a given prefix
sourcefn head_object<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
bucket: &'life1 str,
key: &'life2 str
) -> Pin<Box<dyn Future<Output = ObjectClientResult<HeadObjectResult, HeadObjectError, Self::ClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn head_object<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, bucket: &'life1 str, key: &'life2 str ) -> Pin<Box<dyn Future<Output = ObjectClientResult<HeadObjectResult, HeadObjectError, Self::ClientError>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,
Retrieve object metadata without retrieving the object contents
sourcefn put_object<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
bucket: &'life1 str,
key: &'life2 str,
params: &'life3 PutObjectParams,
contents: impl 'async_trait + Stream<Item = impl 'async_trait + AsRef<[u8]> + Send> + Send
) -> Pin<Box<dyn Future<Output = ObjectClientResult<PutObjectResult, PutObjectError, Self::ClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn put_object<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, bucket: &'life1 str, key: &'life2 str, params: &'life3 PutObjectParams, contents: impl 'async_trait + Stream<Item = impl 'async_trait + AsRef<[u8]> + Send> + Send ) -> Pin<Box<dyn Future<Output = ObjectClientResult<PutObjectResult, PutObjectError, Self::ClientError>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,
Put an object into the object store. The contents are provided by the client as an async stream of buffers.
sourcefn get_object_attributes<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
bucket: &'life1 str,
key: &'life2 str,
max_parts: Option<usize>,
part_number_marker: Option<usize>,
object_attributes: &'life3 [ObjectAttribute]
) -> Pin<Box<dyn Future<Output = ObjectClientResult<GetObjectAttributesResult, GetObjectAttributesError, Self::ClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn get_object_attributes<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, bucket: &'life1 str, key: &'life2 str, max_parts: Option<usize>, part_number_marker: Option<usize>, object_attributes: &'life3 [ObjectAttribute] ) -> Pin<Box<dyn Future<Output = ObjectClientResult<GetObjectAttributesResult, GetObjectAttributesError, Self::ClientError>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,
Retrieves all the metadata from an object without returning the object contents.