pub struct InMemoryCheckpointStore { /* private fields */ }Expand description
基于内存的 Checkpoint 存储后端。
通过 save_with_trace() 关联 trace_id,或在存储层组织关联。
Implementations§
Trait Implementations§
Source§impl CheckpointStore for InMemoryCheckpointStore
impl CheckpointStore for InMemoryCheckpointStore
Source§fn save_with_trace<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
trace_id: &'life1 TraceId,
checkpoint: &'life2 Checkpoint,
) -> Pin<Box<dyn Future<Output = Result<(), CheckpointStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn save_with_trace<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
trace_id: &'life1 TraceId,
checkpoint: &'life2 Checkpoint,
) -> Pin<Box<dyn Future<Output = Result<(), CheckpointStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
保存 Checkpoint 并关联 trace_id。
fn load<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 CheckpointId,
) -> Pin<Box<dyn Future<Output = Result<Option<Checkpoint>, CheckpointStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_latest<'life0, 'life1, 'async_trait>(
&'life0 self,
trace_id: &'life1 TraceId,
) -> Pin<Box<dyn Future<Output = Result<Option<Checkpoint>, CheckpointStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list<'life0, 'life1, 'async_trait>(
&'life0 self,
trace_id: &'life1 TraceId,
) -> Pin<Box<dyn Future<Output = Result<Vec<CheckpointId>, CheckpointStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 CheckpointId,
) -> Pin<Box<dyn Future<Output = Result<bool, CheckpointStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn prune<'life0, 'life1, 'async_trait>(
&'life0 self,
trace_id: &'life1 TraceId,
keep: usize,
) -> Pin<Box<dyn Future<Output = Result<usize, CheckpointStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§impl Default for InMemoryCheckpointStore
impl Default for InMemoryCheckpointStore
Source§fn default() -> InMemoryCheckpointStore
fn default() -> InMemoryCheckpointStore
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for InMemoryCheckpointStore
impl RefUnwindSafe for InMemoryCheckpointStore
impl Send for InMemoryCheckpointStore
impl Sync for InMemoryCheckpointStore
impl Unpin for InMemoryCheckpointStore
impl UnsafeUnpin for InMemoryCheckpointStore
impl UnwindSafe for InMemoryCheckpointStore
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