pub struct RedactionInspection { /* private fields */ }Expand description
Highest sensitivity found by one complete, bounded inspection.
A successful value is conclusive under the selected policy. None from
Self::max_sensitivity means no inspected value was declared sensitive;
a disabled policy deliberately bypasses classification, as reported by
Self::is_redaction_disabled. It does not prove that source data is
inherently nonsensitive. Inconclusive traversal is returned as
crate::RedactionInspectionError instead of this type.
§Examples
use qubit_redact::Redactor;
use qubit_redact::Sensitivity;
let inspection = Redactor::strict()
.inspect_field("password", "raw-secret")
.expect("the scalar inspection is bounded and valid");
assert_eq!(inspection.max_sensitivity(), Some(Sensitivity::Secret));Implementations§
Source§impl RedactionInspection
impl RedactionInspection
Sourcepub const fn contains_sensitive(&self) -> bool
pub const fn contains_sensitive(&self) -> bool
Reports whether the complete traversal found sensitive data.
§Returns
True when the complete traversal found at least one sensitive value.
Sourcepub const fn is_redaction_disabled(&self) -> bool
pub const fn is_redaction_disabled(&self) -> bool
Returns whether the selected policy disabled this inspection.
§Returns
True when policy classification was intentionally disabled for this inspection.
Sourcepub const fn max_sensitivity(&self) -> Option<Sensitivity>
pub const fn max_sensitivity(&self) -> Option<Sensitivity>
Returns the strongest sensitivity found by the complete traversal.
§Returns
Some(level) for declared sensitive data, or None when the selected
policy declared none, including when classification was disabled.
Sourcepub const fn usage(&self) -> RedactionUsage
pub const fn usage(&self) -> RedactionUsage
Returns resources consumed while classifying the input.
Output bytes are always zero because inspection never renders values.
§Returns
Resources consumed during complete classification, with zero output bytes.
Trait Implementations§
Source§impl Clone for RedactionInspection
impl Clone for RedactionInspection
Source§fn clone(&self) -> RedactionInspection
fn clone(&self) -> RedactionInspection
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more