pub struct VecRecordStore { /* private fields */ }Expand description
Default in-memory RecordStore backed by a Vec, zero-config.
Implementations§
Trait Implementations§
Source§impl Default for VecRecordStore
impl Default for VecRecordStore
Source§impl RecordStore for VecRecordStore
impl RecordStore for VecRecordStore
Source§fn insert(&self, record: Record)
fn insert(&self, record: Record)
Persist a record. Must be callable from the ingester background task.
Source§fn get(&self, id: RecordId) -> Option<Cow<'_, Record>>
fn get(&self, id: RecordId) -> Option<Cow<'_, Record>>
Retrieve a single record by ID. Returns
None if not present.Source§fn get_many(&self, ids: &[RecordId]) -> Vec<Option<Cow<'_, Record>>>
fn get_many(&self, ids: &[RecordId]) -> Vec<Option<Cow<'_, Record>>>
Retrieve multiple records in one call (allows batch I/O optimisation).
The default impl calls
get in a loop; override for bulk reads.fn is_empty(&self) -> bool
Auto Trait Implementations§
impl !Freeze for VecRecordStore
impl RefUnwindSafe for VecRecordStore
impl Send for VecRecordStore
impl Sync for VecRecordStore
impl Unpin for VecRecordStore
impl UnsafeUnpin for VecRecordStore
impl UnwindSafe for VecRecordStore
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