pub struct TwoTierMemory { /* private fields */ }Expand description
Composes a hot RingMemory tier with a cold SqliteMemoryStore tier.
Implementations§
Source§impl TwoTierMemory
impl TwoTierMemory
Sourcepub fn in_memory(ring_capacity: usize) -> Result<Self, MemoryError>
pub fn in_memory(ring_capacity: usize) -> Result<Self, MemoryError>
Create a two-tier store with ring capacity ring_capacity.
Trait Implementations§
Source§impl MemoryPort for TwoTierMemory
impl MemoryPort for TwoTierMemory
Source§type Error = MemoryError
type Error = MemoryError
Error type returned by memory operations.
Source§fn append(&self, key: &str, content: &str) -> Result<Uuid, Self::Error>
fn append(&self, key: &str, content: &str) -> Result<Uuid, Self::Error>
Append a new entry under
key with content. Returns the new id.Source§fn get(&self, key: &str) -> Result<Option<String>, Self::Error>
fn get(&self, key: &str) -> Result<Option<String>, Self::Error>
Return the latest value for
key, if any.Auto Trait Implementations§
impl !Freeze for TwoTierMemory
impl RefUnwindSafe for TwoTierMemory
impl Send for TwoTierMemory
impl Sync for TwoTierMemory
impl Unpin for TwoTierMemory
impl UnsafeUnpin for TwoTierMemory
impl UnwindSafe for TwoTierMemory
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