pub struct MemoryObjects { /* private fields */ }Expand description
Bounded deterministic process-local reference provider.
Acknowledged state is ephemeral and has no isolation, durability, distribution, or production availability claim.
Implementations§
Source§impl MemoryObjects
impl MemoryObjects
Sourcepub async fn bucket_named(
&self,
name: &str,
) -> Result<Option<BucketRef>, ObjectsError>
pub async fn bucket_named( &self, name: &str, ) -> Result<Option<BucketRef>, ObjectsError>
Resolves a bucket by its canonical name without mutating provider state.
Sourcepub fn with_default_bucket() -> (Self, BucketRef)
pub fn with_default_bucket() -> (Self, BucketRef)
Creates the default bounded reference provider with one deterministic bucket.
Sourcepub fn new(maximum_bytes: u64) -> Result<Self, ObjectsError>
pub fn new(maximum_bytes: u64) -> Result<Self, ObjectsError>
Creates an empty reference provider with an explicit aggregate byte ceiling.
§Errors
Rejects zero or process-unrepresentable limits before allocating provider state.
Sourcepub fn with_bucket(
name: impl Into<String>,
maximum_bytes: u64,
) -> Result<(Self, BucketRef), ObjectsError>
pub fn with_bucket( name: impl Into<String>, maximum_bytes: u64, ) -> Result<(Self, BucketRef), ObjectsError>
Creates a bounded provider with one deterministic bucket already admitted.
This synchronous constructor lets another in-process SDK family compose the exact public reference provider without running an executor merely to establish its private bucket.
§Errors
Rejects an invalid bucket name or memory ceiling.
Sourcepub fn with_bucket_limits(
name: impl Into<String>,
maximum_object_bytes: u64,
maximum_bytes: u64,
) -> Result<(Self, BucketRef), ObjectsError>
pub fn with_bucket_limits( name: impl Into<String>, maximum_object_bytes: u64, maximum_bytes: u64, ) -> Result<(Self, BucketRef), ObjectsError>
Creates one deterministic bucket with independent per-object and aggregate bounds.
§Errors
Rejects an invalid bucket name, zero limits, a per-object limit larger than the aggregate limit, or limits that cannot be represented by this process.
Trait Implementations§
Source§impl Clone for MemoryObjects
impl Clone for MemoryObjects
Source§impl Default for MemoryObjects
impl Default for MemoryObjects
Source§impl ObjectsProvider for MemoryObjects
impl ObjectsProvider for MemoryObjects
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
Auto Trait Implementations§
impl !RefUnwindSafe for MemoryObjects
impl !UnwindSafe for MemoryObjects
impl Freeze for MemoryObjects
impl Send for MemoryObjects
impl Sync for MemoryObjects
impl Unpin for MemoryObjects
impl UnsafeUnpin for MemoryObjects
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
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request