pub struct DefaultTraceEngine { /* private fields */ }Expand description
默认 Trace 引擎
Implementations§
Source§impl DefaultTraceEngine
impl DefaultTraceEngine
pub fn new(sanitizer: impl PrivacySanitizer + Send + Sync + 'static) -> Self
Sourcepub fn validate_sanitization(&self, golden: &GoldenTrace) -> ReplayResult
pub fn validate_sanitization(&self, golden: &GoldenTrace) -> ReplayResult
仅校验脱敏。policy_match 与 execution_match 显式置为 false,
且对应的 divergence 列表为空 —— 含义是“这一层未被检查“,而不是
“检查过且失败”。两层语义分离:
- match flag 回答“该层是否通过校验“。
- divergence 列表回答“如果失败了,是哪里失败“。
调用方通过 result.all_match() 自然区分;想做端到端校验请改用
TraceValidator::validate,它会把三层都填出来。
Trait Implementations§
Source§impl TraceValidator for DefaultTraceEngine
impl TraceValidator for DefaultTraceEngine
Source§fn validate(
&self,
golden: &GoldenTrace,
actual_intents: &IntentBatch,
actual_executed: &[ExecutedAction],
) -> ReplayResult
fn validate( &self, golden: &GoldenTrace, actual_intents: &IntentBatch, actual_executed: &[ExecutedAction], ) -> ReplayResult
对比 Golden Trace,返回三个维度的验证结果
Auto Trait Implementations§
impl Freeze for DefaultTraceEngine
impl !RefUnwindSafe for DefaultTraceEngine
impl Send for DefaultTraceEngine
impl Sync for DefaultTraceEngine
impl Unpin for DefaultTraceEngine
impl UnsafeUnpin for DefaultTraceEngine
impl !UnwindSafe for DefaultTraceEngine
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