pub struct InMemoryExecutionLog { /* private fields */ }Expand description
内存执行日志存储。
使用环形缓冲区存储执行记录,超过最大容量时自动丢弃最旧的记录。
Implementations§
Source§impl InMemoryExecutionLog
impl InMemoryExecutionLog
Sourcepub fn with_capacity(max_records: usize) -> Self
pub fn with_capacity(max_records: usize) -> Self
创建指定容量的内存执行日志。
Trait Implementations§
Source§impl Default for InMemoryExecutionLog
impl Default for InMemoryExecutionLog
Source§impl ExecutionLogStorage for InMemoryExecutionLog
impl ExecutionLogStorage for InMemoryExecutionLog
Source§fn record(&self, record: ExecutionRecord)
fn record(&self, record: ExecutionRecord)
记录一条执行记录。
Source§fn query(&self, filter: &ExecutionLogQuery) -> Vec<ExecutionRecord>
fn query(&self, filter: &ExecutionLogQuery) -> Vec<ExecutionRecord>
按条件查询执行记录。
Source§fn count(&self, filter: &ExecutionLogQuery) -> usize
fn count(&self, filter: &ExecutionLogQuery) -> usize
统计符合条件的记录数。
Auto Trait Implementations§
impl !Freeze for InMemoryExecutionLog
impl RefUnwindSafe for InMemoryExecutionLog
impl Send for InMemoryExecutionLog
impl Sync for InMemoryExecutionLog
impl Unpin for InMemoryExecutionLog
impl UnsafeUnpin for InMemoryExecutionLog
impl UnwindSafe for InMemoryExecutionLog
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