pub struct InMemoryBlobStore { /* private fields */ }Expand description
基于内存的 Checkpoint 存储后端。
通过 save_with_trace() 关联 trace_id,或在存储层组织关联。
Implementations§
Trait Implementations§
Source§impl BlobCheckpointStore for InMemoryBlobStore
impl BlobCheckpointStore for InMemoryBlobStore
Source§fn save_with_trace<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
trace_id: &'life1 TraceId,
blob: &'life2 CheckpointBlob,
) -> 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,
blob: &'life2 CheckpointBlob,
) -> Pin<Box<dyn Future<Output = Result<(), CheckpointStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
保存 CheckpointBlob 并关联 trace_id。
Source§fn load<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 CheckpointId,
) -> Pin<Box<dyn Future<Output = Result<Option<CheckpointBlob>, CheckpointStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 CheckpointId,
) -> Pin<Box<dyn Future<Output = Result<Option<CheckpointBlob>, CheckpointStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
加载指定 ID 的 CheckpointBlob。
Source§fn load_latest<'life0, 'life1, 'async_trait>(
&'life0 self,
trace_id: &'life1 TraceId,
) -> Pin<Box<dyn Future<Output = Result<Option<CheckpointBlob>, 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<CheckpointBlob>, CheckpointStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
加载 trace 最新的 CheckpointBlob。
Source§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 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,
列出 trace 的所有 CheckpointId(按时间倒序)。
Source§impl Default for InMemoryBlobStore
impl Default for InMemoryBlobStore
Source§fn default() -> InMemoryBlobStore
fn default() -> InMemoryBlobStore
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for InMemoryBlobStore
impl RefUnwindSafe for InMemoryBlobStore
impl Send for InMemoryBlobStore
impl Sync for InMemoryBlobStore
impl Unpin for InMemoryBlobStore
impl UnsafeUnpin for InMemoryBlobStore
impl UnwindSafe for InMemoryBlobStore
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