pub struct AkashicRecords { /* private fields */ }Implementations§
Source§impl AkashicRecords
impl AkashicRecords
pub fn open(path: &str) -> Result<Self>
pub fn put_meta(&self, meta: &MemoryMeta) -> Result<()>
pub fn get_meta(&self, id: &str) -> Result<Option<MemoryMeta>>
pub fn remove_meta(&self, id: &str) -> Result<()>
Sourcepub fn commit_meta_and_clear_migration(&self, meta: &MemoryMeta) -> Result<()>
pub fn commit_meta_and_clear_migration(&self, meta: &MemoryMeta) -> Result<()>
原子批量更新:同时写新元数据 + 删除迁移标记
pub fn update_access(&self, id: &str, now_ms: i64) -> Result<()>
pub fn scan_all_metas(&self) -> Result<Vec<MemoryMeta>>
pub fn count_hot(&self) -> usize
pub fn put_raw_vector(&self, id: &str, vec: &[f32]) -> Result<()>
pub fn get_raw_vector(&self, id: &str) -> Result<Option<Vec<f32>>>
pub fn remove_raw_vector(&self, id: &str) -> Result<()>
pub fn put_migration_state( &self, id: &str, state: &MigrationState, ) -> Result<()>
pub fn get_migration_state(&self, id: &str) -> Result<Option<MigrationState>>
pub fn remove_migration_state(&self, id: &str) -> Result<()>
pub fn scan_pending_migrations(&self) -> Vec<String>
pub fn put_importance(&self, id: &str, val: f32) -> Result<()>
pub fn get_importance(&self, id: &str) -> Result<f32>
pub fn remove_importance(&self, id: &str) -> Result<()>
pub fn scan_all_importance(&self) -> Vec<(String, f32)>
pub fn put_partition(&self, p: &Partition) -> Result<()>
pub fn load_all_partitions(&self) -> Result<Vec<Partition>>
pub fn clear_all_partitions(&self) -> Result<()>
Auto Trait Implementations§
impl Freeze for AkashicRecords
impl RefUnwindSafe for AkashicRecords
impl Send for AkashicRecords
impl Sync for AkashicRecords
impl Unpin for AkashicRecords
impl UnsafeUnpin for AkashicRecords
impl UnwindSafe for AkashicRecords
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