pub struct HistoryStore { /* private fields */ }Implementations§
Source§impl HistoryStore
impl HistoryStore
pub fn new(root: PathBuf) -> Self
Sourcepub fn new_with_shard_size(root: PathBuf, shard_size: usize) -> Self
pub fn new_with_shard_size(root: PathBuf, shard_size: usize) -> Self
For testing, allow overriding shard size
Sourcepub fn append(&mut self, record: &HistoryRecord) -> Result<usize, AicoError>
pub fn append(&mut self, record: &HistoryRecord) -> Result<usize, AicoError>
Appends a record and returns its global index.
Sourcepub fn stream_many<'a>(&'a self, indices: &[usize]) -> HistoryStream<'a> ⓘ
pub fn stream_many<'a>(&'a self, indices: &[usize]) -> HistoryStream<'a> ⓘ
Returns a lazy iterator that yields records in disk order (by global ID).
pub fn read_many( &self, indices: &[usize], ) -> Result<Vec<HistoryRecord>, AicoError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HistoryStore
impl RefUnwindSafe for HistoryStore
impl Send for HistoryStore
impl Sync for HistoryStore
impl Unpin for HistoryStore
impl UnwindSafe for HistoryStore
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