pub struct InMemoryIdempotencyIndex { /* private fields */ }Expand description
In-memory IdempotencyIndex — HashMap-backed. Suitable for tests
and Tier-0 dev; the PG-backed production implementation lands alongside
the L2 service layer.
Implementations§
Source§impl InMemoryIdempotencyIndex
impl InMemoryIdempotencyIndex
Sourcepub fn insert(
&mut self,
key: [u8; 16],
entity: EntityId,
tick: Tick,
) -> Result<(), DedupError>
pub fn insert( &mut self, key: [u8; 16], entity: EntityId, tick: Tick, ) -> Result<(), DedupError>
Insert a new (key, entity, tick) binding. Rejects with
DedupError::Conflict if the key is already bound to a different
(entity, tick) pair. Idempotent re-insert of the same binding is
a no-op success.
Trait Implementations§
Source§impl Debug for InMemoryIdempotencyIndex
impl Debug for InMemoryIdempotencyIndex
Source§impl Default for InMemoryIdempotencyIndex
impl Default for InMemoryIdempotencyIndex
Source§fn default() -> InMemoryIdempotencyIndex
fn default() -> InMemoryIdempotencyIndex
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for InMemoryIdempotencyIndex
impl RefUnwindSafe for InMemoryIdempotencyIndex
impl Send for InMemoryIdempotencyIndex
impl Sync for InMemoryIdempotencyIndex
impl Unpin for InMemoryIdempotencyIndex
impl UnsafeUnpin for InMemoryIdempotencyIndex
impl UnwindSafe for InMemoryIdempotencyIndex
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