pub struct RedactionInspection { /* private fields */ }Expand description
Highest sensitivity found by one complete, bounded inspection.
A successful value proves the complete admitted input was classified.
None from Self::max_sensitivity therefore means no inspected value
was declared sensitive. 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.
Sourcepub const fn is_redaction_disabled(&self) -> bool
pub const fn is_redaction_disabled(&self) -> bool
Returns whether redaction was globally 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 sensitive data, or None when the complete input was
classified as plain.
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.
Trait Implementations§
Source§impl Clone for RedactionInspection
impl Clone for RedactionInspection
Source§fn clone(&self) -> RedactionInspection
fn clone(&self) -> RedactionInspection
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for RedactionInspection
Source§impl Debug for RedactionInspection
impl Debug for RedactionInspection
impl Eq for RedactionInspection
Source§impl PartialEq for RedactionInspection
impl PartialEq for RedactionInspection
impl StructuralPartialEq for RedactionInspection
Auto Trait Implementations§
impl Freeze for RedactionInspection
impl RefUnwindSafe for RedactionInspection
impl Send for RedactionInspection
impl Sync for RedactionInspection
impl Unpin for RedactionInspection
impl UnsafeUnpin for RedactionInspection
impl UnwindSafe for RedactionInspection
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