pub struct SensitivitySpec { /* private fields */ }Expand description
Declares which document field values observability may capture.
Drives value-suppression so observability never leaks tenant values (NFR-S2). The model is deny-by-default (opt-out): every field is treated as sensitive unless explicitly allow-listed as safe. A field added to your documents tomorrow is protected automatically, you opt specific, known-safe fields out of redaction rather than remembering to opt every risky one in.
Use SensitivitySpec::allowing to name the shape-only, non-tenant fields
that are safe to capture; SensitivitySpec::all_sensitive (the default)
redacts everything; SensitivitySpec::nothing_sensitive is the explicit
opt-out for data that carries no tenant values at all (e.g. test fixtures).
Implementations§
Source§impl SensitivitySpec
impl SensitivitySpec
Sourcepub fn all_sensitive() -> Self
pub fn all_sensitive() -> Self
Deny by default: every field’s value is sensitive. The safe default.
Sourcepub fn allowing(safe: Vec<FieldName>) -> Self
pub fn allowing(safe: Vec<FieldName>) -> Self
Deny by default, except the safe fields (known shape-only / non-tenant
values) which observability may capture.
Sourcepub fn nothing_sensitive() -> Self
pub fn nothing_sensitive() -> Self
Treat nothing as sensitive. An explicit opt-out for data that carries no tenant values (e.g. test fixtures); never appropriate for tenant payloads.
Sourcepub fn none() -> Self
pub fn none() -> Self
Alias for SensitivitySpec::nothing_sensitive.
Sourcepub fn is_sensitive(&self, field: &FieldName) -> bool
pub fn is_sensitive(&self, field: &FieldName) -> bool
Whether field’s value is sensitive (deny-by-default: sensitive unless
explicitly allow-listed as safe).
Trait Implementations§
Source§impl Clone for SensitivitySpec
impl Clone for SensitivitySpec
Source§fn clone(&self) -> SensitivitySpec
fn clone(&self) -> SensitivitySpec
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SensitivitySpec
impl Debug for SensitivitySpec
Source§impl Default for SensitivitySpec
impl Default for SensitivitySpec
impl Eq for SensitivitySpec
Source§impl PartialEq for SensitivitySpec
impl PartialEq for SensitivitySpec
Source§fn eq(&self, other: &SensitivitySpec) -> bool
fn eq(&self, other: &SensitivitySpec) -> bool
self and other values to be equal, and is used by ==.