Skip to main content

MemoryProvider

Struct MemoryProvider 

Source
pub struct MemoryProvider { /* private fields */ }
Expand description

In-memory native calls used beneath the shared storage connection.

Trait Implementations§

Source§

impl Clone for MemoryProvider

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 ProviderOps for MemoryProvider

Source§

fn folder_label<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<FolderLabel, StorageError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

A Dropbox shared folder’s or a OneDrive folder’s address is under storage.example.test, after its id.

Source§

fn account_identity<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<ProviderAccount, StorageError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

The fake’s id for an account is its address behind id:.

Source§

fn leave<'life0, 'life1, 'async_trait>( &'life0 self, invitation: &'life1 StorageInvitation, ) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

As Dropbox’s unmount, the only provider undo: a mounted recipient goes back to invited; one not joined, or no longer shared, is done. Other providers’ acceptance stays, as theirs does.

Source§

fn create_location_marker<'life0, 'async_trait>( &'life0 self, store: StoreId, _device: DeviceId, ) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Create D10’s location marker at the location’s root with the provider’s create-once request. Only first setup at a location that holds one store calls this operation. Anything it stages sits in device’s reserved folder (D10).
Source§

fn read_location_marker<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, StorageError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Read the complete location marker, bounded to D10’s UUID byte count. Only a location that holds one store calls this operation. A marker read that finds nothing confirms the location is still there first.
Source§

fn account<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<String, StorageError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Signed-in account; coven shares nothing on S3, so it has none.
Source§

fn s3_access_key_id<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Option<String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

The id of the S3 key this provider signs with now, without its secret.
Source§

fn set_s3_credentials<'life0, 'async_trait>( &'life0 self, credentials: S3Credentials, ) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Replace the S3 signing key after credential custody commits it.
Source§

fn config(&self) -> StorageConfig

This provider’s location.
Source§

fn set_oauth_tokens<'life0, 'async_trait>( &'life0 self, tokens: OAuthTokens, ) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Replace tokens after credential custody commits them.
Source§

fn single_request_limit(&self) -> u64

Largest complete body accepted by create or replace.
Source§

fn read_part_size(&self) -> Option<NonZeroU64>

The size of the parts a ranged read moves whole (crate::Storage::read_part_size); None when a range moves only its own bytes.
Source§

fn create<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, publication: &'life1 PublicationRequest, path: &'life2 ObjectPath, bytes: &'life3 [u8], sent: &'life4 ByteProgress, _device: DeviceId, ) -> Pin<Box<dyn Future<Output = Result<Option<StoredObject>, StorageError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Create in one request, telling sent the body’s bytes as the provider’s client hands them over. A temporary it stages sits in device’s reserved folder (D10). Returns the created object’s metadata when the reply carries it.
Source§

fn replace<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, publication: &'life1 PublicationRequest, previous: &'life2 StoredObject, bytes: &'life3 [u8], _device: DeviceId, ) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Replace the observed object in one atomic conditional publication. A temporary it stages sits in device’s reserved folder (D10).
Source§

fn status<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 ObjectPath, ) -> Pin<Box<dyn Future<Output = Result<Option<StoredObject>, StorageError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Exact native lookup; only a confirmed missing object returns None.
Source§

fn stream_object<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, path: &'life1 ObjectPath, range: Option<ByteRange>, _received: &'life2 ByteProgress, ) -> Pin<Box<dyn Future<Output = Result<ObjectStream<'_>, StorageError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Read complete bytes or a range, retaining metadata for those exact bytes. The connection hears the stream’s reads itself; a client that fetches bytes before the stream yields them tells received how far through the object they reach as they arrive, counted from the object’s start.
Source§

fn list<'life0, 'life1, 'async_trait>( &'life0 self, listing: &'life1 mut ObjectListing, ) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Consume native pages into the connection’s checked listing.
Source§

fn delete<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 ObjectPath, ) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Delete, accepting an already absent object.
Source§

fn grant_access<'life0, 'life1, 'async_trait>( &'life0 self, account: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<AccessGrant, StorageError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Grant account access, or return S3’s console instructions.
Source§

fn join<'life0, 'life1, 'async_trait>( &'life0 self, invitation: &'life1 StorageInvitation, ) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Accept native sharing material. The connection checks location and reads the exact floor status afterwards to verify readability.
Source§

fn revoke_access<'life0, 'life1, 'async_trait>( &'life0 self, account: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<RetainedAccess>, StorageError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Remove exclusive grants and return grants that still reach the account.
Source§

fn begin_upload<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, publication: &'life1 PublicationRequest, path: &'life2 ObjectPath, total: u64, device: DeviceId, ) -> Pin<Box<dyn Future<Output = Result<UploadSession, StorageError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Begin a nonempty create-once upload at path, for device, whose reserved folder holds its temporaries (D10).
Source§

fn device_uploads<'life0, 'async_trait>( &'life0 self, store: StoreId, device: DeviceId, ) -> Pin<Box<dyn Future<Output = Result<Vec<LeftUpload>, StorageError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

The uploads device left in store that this sign-in can see: the sessions and temporaries in its reserved folder (D10), and, where the provider puts a session at its destination, those under the device’s file and snapshot folders. Every page of each listing is followed.
Source§

fn settled_claim_uploads<'life0, 'async_trait>( &'life0 self, store: StoreId, through: u64, ) -> Pin<Box<dyn Future<Output = Result<Vec<LeftUpload>, StorageError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

The unfinished sessions at slots 1 to through of store, whoever began them: where a claim’s session sits at its slot’s path, one at a slot this device has applied can never publish, since create-once refuses it there. A provider that puts no session at a slot’s path returns none.
Source§

fn end_left_upload<'life0, 'life1, 'async_trait>( &'life0 self, upload: &'life1 LeftUpload, ) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

End one upload another device left, as this provider listed it: abort the session, or delete what it staged. One already ended succeeds, and a published object is never touched.
Source§

fn resume_upload<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, publication: &'life1 PublicationRequest, session: &'life2 mut UploadSession, ) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Recover native progress of a validated, incomplete session.
Source§

fn upload_part<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, publication: &'life1 PublicationRequest, session: &'life2 mut UploadSession, bytes: &'life3 [u8], end: u64, sent: &'life4 ByteProgress, ) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Send a checked part ending at end. The connection validates its length, boundary and session; implementations enforce the native protocol. sent already counts from the part’s start in the object.
Source§

fn send_independent_part<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, publication: &'life1 PublicationRequest, session: &'life2 UploadSession, offset: u64, bytes: &'life3 [u8], sent: &'life4 ByteProgress, ) -> Pin<Box<dyn Future<Output = Result<ConfirmedPart, StorageError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Send part offset.. of a session whose parts are independent (UploadSession::parts_independent), leaving the session as it is: the provider’s confirmation of the part comes back, for the caller to add. Several may be in flight at once. The connection checks the part is a whole one the session lacks; sent already counts from the part’s start in the object. A provider whose parts go in order has none to send this way.
Source§

fn finish_upload<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, publication: &'life1 PublicationRequest, session: &'life2 mut UploadSession, ) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Publish an incomplete session, checking native progress where required.
Source§

fn abort_upload<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, publication: &'life1 PublicationRequest, session: &'life2 UploadSession, ) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Abandon an incomplete session without deleting published bytes.
Source§

fn read_object<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 ObjectPath, range: Option<ByteRange>, ) -> Pin<Box<dyn Future<Output = Result<ObjectRead, StorageError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Collect a bounded response through the streaming implementation. Large writes and snapshots consume stream_object directly. This convenience reader holds at most 32 MiB, regardless of provider metadata.
Source§

fn detection_leftovers<'life0, 'async_trait>( &'life0 self, _store: StoreId, _run: Uuid, ) -> Pin<Box<dyn Future<Output = Result<Vec<LeftUpload>, StorageError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

What S3 detection run run left in store’s .coven-check prefix (§20.7): its unfinished multipart uploads, then its probes. Only S3 detects, so elsewhere no run left anything.

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
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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
§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

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

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

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> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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 more
§

impl<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
§

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

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

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
§

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

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