pub trait DomainContext {
// Required methods
fn domain_kind(&self) -> &'static str;
fn grouping_key(&self) -> String;
fn to_json(&self) -> Value;
}Expand description
Project-specific forensic context attached to a report.
Implementors return only structural/diagnostic data — never user content
(keys, values, paths that identify user data). The faultbox writer applies
the configured Redactor to the serialized value as defence in depth.
Required Methods§
Sourcefn domain_kind(&self) -> &'static str
fn domain_kind(&self) -> &'static str
Short domain tag, e.g. "store.dangling_child". Becomes part of the
fingerprint and groups reports by failure site. A compile-time constant.
Sourcefn grouping_key(&self) -> String
fn grouping_key(&self) -> String
A stable identifier for this class of failure — NOT this instance.
e.g. "kind=0x09" for “internal child recycled as overflow root”,
independent of which page ids happened to be involved. Reports sharing a
(domain_kind, grouping_key) are the same bug.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".