pub struct InMemoryRecordStorage<R> { /* private fields */ }Implementations§
Source§impl<R> InMemoryRecordStorage<R>where
R: Clone,
impl<R> InMemoryRecordStorage<R>where
R: Clone,
pub fn new(config: StorageConfig) -> Self
pub fn recent_records(&mut self, limit: NonZeroUsize) -> Result<Vec<R>>
Trait Implementations§
Source§impl<R> RecordStorageBase for InMemoryRecordStorage<R>where
R: ReadableRecordPrelude,
impl<R> RecordStorageBase for InMemoryRecordStorage<R>where
R: ReadableRecordPrelude,
fn descriptor(&self) -> &StorageDescriptor
fn config(&self) -> &StorageConfig
fn replace_config(&mut self, new_config: StorageConfig) -> StorageConfig
fn perform_housekeeping(&mut self) -> Result<()>
Source§fn retain_all_records_created_since(
&mut self,
created_since: SystemTime,
) -> Result<()>
fn retain_all_records_created_since( &mut self, created_since: SystemTime, ) -> Result<()>
Try to drop records that have been created before the given time
fn report_statistics(&mut self) -> Result<StorageStatistics>
Source§impl<R> RecordStorageWrite<R> for InMemoryRecordStorage<R>where
R: ReadableRecordPrelude + WritableRecordPrelude,
impl<R> RecordStorageWrite<R> for InMemoryRecordStorage<R>where
R: ReadableRecordPrelude + WritableRecordPrelude,
fn append_record( &mut self, created_at: &SystemInstant, record: R, ) -> Result<(WriteResult, CreatedAtOffset)>
Auto Trait Implementations§
impl<R> Freeze for InMemoryRecordStorage<R>
impl<R> RefUnwindSafe for InMemoryRecordStorage<R>where
R: RefUnwindSafe,
impl<R> Send for InMemoryRecordStorage<R>where
R: Send,
impl<R> Sync for InMemoryRecordStorage<R>where
R: Sync,
impl<R> Unpin for InMemoryRecordStorage<R>where
R: Unpin,
impl<R> UnwindSafe for InMemoryRecordStorage<R>where
R: UnwindSafe,
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