Skip to main content

ExecutionLogStorage

Trait ExecutionLogStorage 

Source
pub trait ExecutionLogStorage:
    Send
    + Sync
    + 'static {
    // Required methods
    fn record(&self, record: ExecutionRecord);
    fn query(&self, filter: &ExecutionLogQuery) -> Vec<ExecutionRecord>;
    fn count(&self, filter: &ExecutionLogQuery) -> usize;
    fn clear(&self);
}
Expand description

执行日志存储 trait。

实现此 trait 以自定义执行日志的存储方式。 默认提供 InMemoryExecutionLog(内存存储)。

Required Methods§

Source

fn record(&self, record: ExecutionRecord)

记录一条执行记录。

Source

fn query(&self, filter: &ExecutionLogQuery) -> Vec<ExecutionRecord>

按条件查询执行记录。

Source

fn count(&self, filter: &ExecutionLogQuery) -> usize

统计符合条件的记录数。

Source

fn clear(&self)

清空所有执行记录。

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§