pub struct MemoryStorageBuilder { /* private fields */ }Expand description
Shared storage fixture choices; production providers do not use these defaults.
Implementations§
Source§impl MemoryStorageBuilder
impl MemoryStorageBuilder
Sourcepub fn provider(self, provider: CloudProvider) -> Self
pub fn provider(self, provider: CloudProvider) -> Self
Use the canonical test location for this provider.
Sourcepub fn location(self, config: StorageConfig) -> Self
pub fn location(self, config: StorageConfig) -> Self
Choose an exact location when comparing or reconnecting locations.
Sourcepub fn clock(self, clock: ClockRef) -> Self
pub fn clock(self, clock: ClockRef) -> Self
Control publication times and OAuth expiry with this clock.
Sourcepub fn time_resolution(self, resolution: Duration) -> Self
pub fn time_resolution(self, resolution: Duration) -> Self
Choose the reported provider tick. Set the fixture clock on this grid.
Sourcepub fn transfer_limits(self, single_limit: u64, part_size: usize) -> Self
pub fn transfer_limits(self, single_limit: u64, part_size: usize) -> Self
Choose the single-request threshold and resumable part size.
Sourcepub fn independent_parts(self) -> Self
pub fn independent_parts(self) -> Self
Keep each session’s parts by index, whatever order they arrive in, as an S3 multipart upload does, so they may go together (§17.9); otherwise the provider takes them in order.
Sourcepub fn reads_whole_parts(self) -> Self
pub fn reads_whole_parts(self) -> Self
Move every part a read reaches whole, as CloudKit’s reads do
(Appendix E.1): an object of up to the part size is one part, a
larger one a part per part size from its start, the last shorter. A
body moves each part once it delivers a byte of it, as CloudKit
fetches a part only once its stream reaches it.
MemoryStorage::moved_bytes counts what each read moved.
Sourcepub fn listing_page(self, entries: NonZeroUsize) -> Self
pub fn listing_page(self, entries: NonZeroUsize) -> Self
Return listings in native pages of this many entries, each page its own request in the trace, as a provider’s continuation requests are (§21.1).
Sourcepub fn build(self) -> Result<MemoryStorage, StorageError>
pub fn build(self) -> Result<MemoryStorage, StorageError>
Validate the choices and construct an isolated storage backend.
Auto Trait Implementations§
impl Freeze for MemoryStorageBuilder
impl !RefUnwindSafe for MemoryStorageBuilder
impl Send for MemoryStorageBuilder
impl Sync for MemoryStorageBuilder
impl Unpin for MemoryStorageBuilder
impl UnsafeUnpin for MemoryStorageBuilder
impl !UnwindSafe for MemoryStorageBuilder
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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