pub struct InMemoryDb { /* private fields */ }Expand description
In-memory bitemporal store for testing and development.
Implementations§
Source§impl InMemoryDb
impl InMemoryDb
Sourcepub fn insert(&mut self, record: BitemporalRecord)
pub fn insert(&mut self, record: BitemporalRecord)
Insert a bitemporal record into this store.
Sourcepub fn get_versions(&self, id: &str) -> Option<&Vec<BitemporalRecord>>
pub fn get_versions(&self, id: &str) -> Option<&Vec<BitemporalRecord>>
Get all versions of a record by ID.
Sourcepub fn snapshot_at(&self, recorded_time: DateTime<Utc>) -> Vec<BitemporalRecord>
pub fn snapshot_at(&self, recorded_time: DateTime<Utc>) -> Vec<BitemporalRecord>
Get all records as a snapshot at a specific recorded_time.
Trait Implementations§
Source§impl Clone for InMemoryDb
impl Clone for InMemoryDb
Source§fn clone(&self) -> InMemoryDb
fn clone(&self) -> InMemoryDb
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InMemoryDb
impl Debug for InMemoryDb
Auto Trait Implementations§
impl Freeze for InMemoryDb
impl RefUnwindSafe for InMemoryDb
impl Send for InMemoryDb
impl Sync for InMemoryDb
impl Unpin for InMemoryDb
impl UnsafeUnpin for InMemoryDb
impl UnwindSafe for InMemoryDb
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