Skip to main content

AkashicRecords

Struct AkashicRecords 

Source
pub struct AkashicRecords { /* private fields */ }

Implementations§

Source§

impl AkashicRecords

Source

pub fn open(path: &str) -> Result<Self>

Source

pub fn put_meta(&self, meta: &MemoryMeta) -> Result<()>

Source

pub fn get_meta(&self, id: &str) -> Result<Option<MemoryMeta>>

Source

pub fn remove_meta(&self, id: &str) -> Result<()>

Source

pub fn commit_meta_and_clear_migration(&self, meta: &MemoryMeta) -> Result<()>

原子批量更新:同时写新元数据 + 删除迁移标记

Source

pub fn update_access(&self, id: &str, now_ms: i64) -> Result<()>

Source

pub fn scan_all_metas(&self) -> Result<Vec<MemoryMeta>>

Source

pub fn count_hot(&self) -> usize

Source

pub fn put_raw_vector(&self, id: &str, vec: &[f32]) -> Result<()>

Source

pub fn get_raw_vector(&self, id: &str) -> Result<Option<Vec<f32>>>

Source

pub fn remove_raw_vector(&self, id: &str) -> Result<()>

Source

pub fn put_migration_state( &self, id: &str, state: &MigrationState, ) -> Result<()>

Source

pub fn get_migration_state(&self, id: &str) -> Result<Option<MigrationState>>

Source

pub fn remove_migration_state(&self, id: &str) -> Result<()>

Source

pub fn scan_pending_migrations(&self) -> Vec<String>

Source

pub fn put_importance(&self, id: &str, val: f32) -> Result<()>

Source

pub fn get_importance(&self, id: &str) -> Result<f32>

Source

pub fn remove_importance(&self, id: &str) -> Result<()>

Source

pub fn scan_all_importance(&self) -> Vec<(String, f32)>

Source

pub fn put_partition(&self, p: &Partition) -> Result<()>

Source

pub fn load_all_partitions(&self) -> Result<Vec<Partition>>

Source

pub fn clear_all_partitions(&self) -> Result<()>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.