pub struct InMemoryMutationLog { /* private fields */ }Expand description
基于内存的 MutationLog 实现。
适用于测试和开发环境。
Implementations§
Trait Implementations§
Source§impl Default for InMemoryMutationLog
impl Default for InMemoryMutationLog
Source§fn default() -> InMemoryMutationLog
fn default() -> InMemoryMutationLog
Returns the “default value” for a type. Read more
Source§impl MutationLogStore for InMemoryMutationLog
impl MutationLogStore for InMemoryMutationLog
Source§fn append<'life0, 'async_trait>(
&'life0 self,
entry: MutationLogEntry,
) -> Pin<Box<dyn Future<Output = Result<(), CheckpointStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn append<'life0, 'async_trait>(
&'life0 self,
entry: MutationLogEntry,
) -> Pin<Box<dyn Future<Output = Result<(), CheckpointStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
追加一条 mutation 日志。
Source§fn replay<'life0, 'life1, 'async_trait>(
&'life0 self,
trace_id: &'life1 TraceId,
from_step: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<MutationLogEntry>, CheckpointStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn replay<'life0, 'life1, 'async_trait>(
&'life0 self,
trace_id: &'life1 TraceId,
from_step: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<MutationLogEntry>, CheckpointStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
重放 trace 从指定步骤开始的 mutation 日志。
Source§fn truncate<'life0, 'life1, 'async_trait>(
&'life0 self,
trace_id: &'life1 TraceId,
keep_from_step: usize,
) -> Pin<Box<dyn Future<Output = Result<usize, CheckpointStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn truncate<'life0, 'life1, 'async_trait>(
&'life0 self,
trace_id: &'life1 TraceId,
keep_from_step: usize,
) -> Pin<Box<dyn Future<Output = Result<usize, CheckpointStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
截断 trace 的旧日志,保留从指定步骤开始的。
Source§fn append_batch<'life0, 'async_trait>(
&'life0 self,
entries: Vec<MutationLogEntry>,
) -> Pin<Box<dyn Future<Output = Result<(), CheckpointStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn append_batch<'life0, 'async_trait>(
&'life0 self,
entries: Vec<MutationLogEntry>,
) -> Pin<Box<dyn Future<Output = Result<(), CheckpointStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
批量追加 mutation 日志。
Auto Trait Implementations§
impl !Freeze for InMemoryMutationLog
impl RefUnwindSafe for InMemoryMutationLog
impl Send for InMemoryMutationLog
impl Sync for InMemoryMutationLog
impl Unpin for InMemoryMutationLog
impl UnsafeUnpin for InMemoryMutationLog
impl UnwindSafe for InMemoryMutationLog
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