Skip to main content

ObjectsProvider

Trait ObjectsProvider 

Source
pub trait ObjectsProvider: Send + Sync {
Show 17 methods // Required methods fn create_bucket<'life0, 'async_trait>( &'life0 self, name: String, idempotency_key: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<Bucket, ObjectsError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn head_bucket<'life0, 'life1, 'async_trait>( &'life0 self, bucket: &'life1 BucketRef, ) -> Pin<Box<dyn Future<Output = Result<Bucket, ObjectsError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn delete_bucket<'life0, 'life1, 'async_trait>( &'life0 self, bucket: &'life1 BucketRef, idempotency_key: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<bool, ObjectsError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn put<'life0, 'async_trait>( &'life0 self, request: PutRequest, ) -> Pin<Box<dyn Future<Output = Result<ObjectVersion, ObjectsError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get<'life0, 'async_trait>( &'life0 self, request: GetRequest, ) -> Pin<Box<dyn Future<Output = Result<BufferedObject, ObjectsError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn delete<'life0, 'async_trait>( &'life0 self, bucket: BucketRef, object_key: String, version_id: Option<String>, condition: Option<Condition>, idempotency_key: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<DeleteResult, ObjectsError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn list<'life0, 'async_trait>( &'life0 self, target: ReadTarget, prefix: String, delimiter: Option<String>, versions: bool, page_size: u32, continuation: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<ProviderListPage, ObjectsError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn snapshot<'life0, 'async_trait>( &'life0 self, bucket: BucketRef, idempotency_key: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<Snapshot, ObjectsError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn destroy_snapshot<'life0, 'async_trait>( &'life0 self, snapshot: SnapshotRef, idempotency_key: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<bool, ObjectsError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn fork<'life0, 'async_trait>( &'life0 self, source: ReadTarget, destination_name: String, idempotency_key: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<Bucket, ObjectsError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn create_multipart<'life0, 'async_trait>( &'life0 self, bucket: BucketRef, object_key: String, metadata: ObjectMetadata, condition: Option<Condition>, idempotency_key: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<MultipartUpload, ObjectsError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn upload_part<'life0, 'async_trait>( &'life0 self, bucket: BucketRef, object_key: String, upload_id: String, part_number: u32, body: Bytes, idempotency_key: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<UploadedPart, ObjectsError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn list_parts<'life0, 'async_trait>( &'life0 self, bucket: BucketRef, object_key: String, upload_id: String, ) -> Pin<Box<dyn Future<Output = Result<Vec<UploadedPart>, ObjectsError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn complete_multipart<'life0, 'async_trait>( &'life0 self, bucket: BucketRef, object_key: String, upload_id: String, parts: Vec<UploadedPart>, idempotency_key: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<ObjectVersion, ObjectsError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn abort_multipart<'life0, 'async_trait>( &'life0 self, bucket: BucketRef, object_key: String, upload_id: String, idempotency_key: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<bool, ObjectsError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; // Provided methods fn put_batch<'life0, 'async_trait>( &'life0 self, requests: Vec<PutRequest>, ) -> Pin<Box<dyn Future<Output = Vec<Result<ObjectVersion, ObjectsError>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn get_batch<'life0, 'async_trait>( &'life0 self, requests: Vec<GetRequest>, ) -> Pin<Box<dyn Future<Output = Vec<Result<BufferedObject, ObjectsError>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... }
}
Expand description

Public semantic provider implemented by memory, customer-hosted, and Acyclic adapters.

Required Methods§

Source

fn create_bucket<'life0, 'async_trait>( &'life0 self, name: String, idempotency_key: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<Bucket, ObjectsError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Create one permanently versioned bucket.

Source

fn head_bucket<'life0, 'life1, 'async_trait>( &'life0 self, bucket: &'life1 BucketRef, ) -> Pin<Box<dyn Future<Output = Result<Bucket, ObjectsError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Resolve one exact bucket identity.

Source

fn delete_bucket<'life0, 'life1, 'async_trait>( &'life0 self, bucket: &'life1 BucketRef, idempotency_key: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<bool, ObjectsError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Delete one empty exact bucket identity.

Source

fn put<'life0, 'async_trait>( &'life0 self, request: PutRequest, ) -> Pin<Box<dyn Future<Output = Result<ObjectVersion, ObjectsError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Create one immutable version.

Source

fn get<'life0, 'async_trait>( &'life0 self, request: GetRequest, ) -> Pin<Box<dyn Future<Output = Result<BufferedObject, ObjectsError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Read one immutable version or its visible current selection.

Source

fn delete<'life0, 'async_trait>( &'life0 self, bucket: BucketRef, object_key: String, version_id: Option<String>, condition: Option<Condition>, idempotency_key: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<DeleteResult, ObjectsError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Create a delete marker or delete one exact version.

Source

fn list<'life0, 'async_trait>( &'life0 self, target: ReadTarget, prefix: String, delimiter: Option<String>, versions: bool, page_size: u32, continuation: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<ProviderListPage, ObjectsError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Capture or continue one stable listing.

Source

fn snapshot<'life0, 'async_trait>( &'life0 self, bucket: BucketRef, idempotency_key: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<Snapshot, ObjectsError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Atomically capture an immutable whole-bucket snapshot.

Source

fn destroy_snapshot<'life0, 'async_trait>( &'life0 self, snapshot: SnapshotRef, idempotency_key: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<bool, ObjectsError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Destroy one exact snapshot identity.

Source

fn fork<'life0, 'async_trait>( &'life0 self, source: ReadTarget, destination_name: String, idempotency_key: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<Bucket, ObjectsError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Atomically fork a whole bucket or snapshot into an independent bucket.

Source

fn create_multipart<'life0, 'async_trait>( &'life0 self, bucket: BucketRef, object_key: String, metadata: ObjectMetadata, condition: Option<Condition>, idempotency_key: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<MultipartUpload, ObjectsError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Create one multipart upload without publishing a version.

Source

fn upload_part<'life0, 'async_trait>( &'life0 self, bucket: BucketRef, object_key: String, upload_id: String, part_number: u32, body: Bytes, idempotency_key: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<UploadedPart, ObjectsError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Upload or replace one exact staged part.

Source

fn list_parts<'life0, 'async_trait>( &'life0 self, bucket: BucketRef, object_key: String, upload_id: String, ) -> Pin<Box<dyn Future<Output = Result<Vec<UploadedPart>, ObjectsError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

List staged parts in ascending part-number order.

Source

fn complete_multipart<'life0, 'async_trait>( &'life0 self, bucket: BucketRef, object_key: String, upload_id: String, parts: Vec<UploadedPart>, idempotency_key: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<ObjectVersion, ObjectsError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Atomically publish a version from exact staged part receipts.

Source

fn abort_multipart<'life0, 'async_trait>( &'life0 self, bucket: BucketRef, object_key: String, upload_id: String, idempotency_key: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<bool, ObjectsError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Abort one exact staged upload.

Provided Methods§

Source

fn put_batch<'life0, 'async_trait>( &'life0 self, requests: Vec<PutRequest>, ) -> Pin<Box<dyn Future<Output = Vec<Result<ObjectVersion, ObjectsError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Creates an ordered bounded group of immutable versions.

Providers without a native durable batch use the exact sequential semantics of Self::put. Each result corresponds to the request at the same position.

Source

fn get_batch<'life0, 'async_trait>( &'life0 self, requests: Vec<GetRequest>, ) -> Pin<Box<dyn Future<Output = Vec<Result<BufferedObject, ObjectsError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Reads an ordered bounded group of immutable versions.

Providers without a native multi-get use the exact sequential semantics of Self::get. Each result corresponds to the request at the same position.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§