Skip to main content

MemoryObjects

Struct MemoryObjects 

Source
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

Source

pub async fn bucket_named( &self, name: &str, ) -> Result<Option<BucketRef>, ObjectsError>

Resolves a bucket by its canonical name without mutating provider state.

Source

pub fn with_default_bucket() -> (Self, BucketRef)

Creates the default bounded reference provider with one deterministic bucket.

Source

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.

Source

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.

Source

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

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Default for MemoryObjects

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

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,

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 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. Read more
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.
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. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<L> LayerExt<L> for L

Source§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in Layered.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more