pub struct VecRecordStore { /* private fields */ }Expand description
Default in-memory RecordStore backed by a Vec, zero-config.
Implementations§
Source§impl VecRecordStore
impl VecRecordStore
pub fn new() -> VecRecordStore
Trait Implementations§
Source§impl Default for VecRecordStore
impl Default for VecRecordStore
Source§fn default() -> VecRecordStore
fn default() -> VecRecordStore
Returns the “default value” for a type. Read more
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: u64) -> Option<Cow<'_, Record>>
fn get(&self, id: u64) -> Option<Cow<'_, Record>>
Retrieve a single record by ID. Returns
None if not present.Source§fn get_many(&self, ids: &[u64]) -> Vec<Option<Cow<'_, Record>>>
fn get_many(&self, ids: &[u64]) -> 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
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> 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>
Converts
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>
Converts
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