pub struct InMemoryRemoteStore { /* private fields */ }Expand description
Local deterministic remote segment store for tests.
Implementations§
Source§impl InMemoryRemoteStore
impl InMemoryRemoteStore
pub fn new() -> Self
Sourcepub fn put_segment(
&mut self,
segment_id: ObjectId,
payload: &[u8],
key: IdempotencyKey,
) -> Result<()>
pub fn put_segment( &mut self, segment_id: ObjectId, payload: &[u8], key: IdempotencyKey, ) -> Result<()>
Idempotent segment upload keyed by idempotency key.
§Errors
Returns FrankenError::Internal when an existing idempotency key is
reused with a different segment/payload.
pub fn has_segment(&self, segment_id: ObjectId) -> bool
pub fn upload_count(&self, segment_id: ObjectId) -> u64
pub fn remove_segment(&mut self, segment_id: ObjectId) -> bool
Trait Implementations§
Source§impl Debug for InMemoryRemoteStore
impl Debug for InMemoryRemoteStore
Source§impl Default for InMemoryRemoteStore
impl Default for InMemoryRemoteStore
Source§fn default() -> InMemoryRemoteStore
fn default() -> InMemoryRemoteStore
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for InMemoryRemoteStore
impl RefUnwindSafe for InMemoryRemoteStore
impl Send for InMemoryRemoteStore
impl Sync for InMemoryRemoteStore
impl Unpin for InMemoryRemoteStore
impl UnsafeUnpin for InMemoryRemoteStore
impl UnwindSafe for InMemoryRemoteStore
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
Mutably borrows from an owned value. Read more
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).