pub struct ExecutionLog { /* private fields */ }Expand description
执行日志查询器,提供便捷的查询方法。
包装 ExecutionLogStorage,提供更友好的查询 API。
Implementations§
Source§impl ExecutionLog
impl ExecutionLog
Sourcepub fn new(storage: Box<dyn ExecutionLogStorage>) -> Self
pub fn new(storage: Box<dyn ExecutionLogStorage>) -> Self
使用指定的存储后端创建执行日志。
Sourcepub fn in_memory_with_capacity(capacity: usize) -> Self
pub fn in_memory_with_capacity(capacity: usize) -> Self
创建指定容量的内存执行日志。
Sourcepub fn record(&self, record: ExecutionRecord)
pub fn record(&self, record: ExecutionRecord)
记录一条执行记录。
Sourcepub fn query(&self, filter: ExecutionLogQuery) -> Vec<ExecutionRecord>
pub fn query(&self, filter: ExecutionLogQuery) -> Vec<ExecutionRecord>
查询执行记录。
Sourcepub fn count(&self, filter: &ExecutionLogQuery) -> usize
pub fn count(&self, filter: &ExecutionLogQuery) -> usize
统计记录数。
Auto Trait Implementations§
impl !RefUnwindSafe for ExecutionLog
impl !UnwindSafe for ExecutionLog
impl Freeze for ExecutionLog
impl Send for ExecutionLog
impl Sync for ExecutionLog
impl Unpin for ExecutionLog
impl UnsafeUnpin for ExecutionLog
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