pub struct RedactionRules { /* private fields */ }Expand description
Immutable, cheap-to-clone field classification snapshot.
Implementations§
Source§impl RedactionRules
impl RedactionRules
Sourcepub fn floor(&self) -> Option<&RedactionFloor>
pub fn floor(&self) -> Option<&RedactionFloor>
Returns the attached minimum floor, if enabled.
Sourcepub fn with_floor(self, floor: RedactionFloor) -> Self
pub fn with_floor(self, floor: RedactionFloor) -> Self
Replaces the floor for this rules snapshot.
Sourcepub fn disable_floor(self) -> Self
pub fn disable_floor(self) -> Self
Disables all floor protection for this rules snapshot.
§Security
This explicitly removes global and configured minimum protection. Use it only when the caller intentionally accepts responsibility for doing so.
Sourcepub fn classify_field<'a>(&'a self, field: &str) -> FieldClassification<'a>
pub fn classify_field<'a>(&'a self, field: &str) -> FieldClassification<'a>
Explains application-rule matching only; it is not the final safety decision.
Sourcepub fn sensitivity_for(&self, field: &str) -> Option<Sensitivity>
pub fn sensitivity_for(&self, field: &str) -> Option<Sensitivity>
Resolves final sensitivity from application and floor layers.
Sourcepub fn matching(&self) -> FieldNameMatching
pub fn matching(&self) -> FieldNameMatching
Returns the application layer’s field-name matching mode.
Sourcepub fn unknown_field_policy(&self) -> UnknownFieldPolicy
pub fn unknown_field_policy(&self) -> UnknownFieldPolicy
Returns the application fallback for unclassified fields.
Sourcepub fn application_sensitive_rules(
&self,
) -> impl Iterator<Item = SensitiveFieldRule<'_>>
pub fn application_sensitive_rules( &self, ) -> impl Iterator<Item = SensitiveFieldRule<'_>>
Iterates only application sensitive rules, never floor rules.
Sourcepub fn application_allow_rules(&self) -> impl Iterator<Item = AllowRule<'_>>
pub fn application_allow_rules(&self) -> impl Iterator<Item = AllowRule<'_>>
Iterates only application allow rules, never floor rules.
Trait Implementations§
Source§impl Clone for RedactionRules
impl Clone for RedactionRules
Source§fn clone(&self) -> RedactionRules
fn clone(&self) -> RedactionRules
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 moreSource§impl Debug for RedactionRules
impl Debug for RedactionRules
impl Eq for RedactionRules
Source§impl PartialEq for RedactionRules
impl PartialEq for RedactionRules
impl StructuralPartialEq for RedactionRules
Auto Trait Implementations§
impl Freeze for RedactionRules
impl RefUnwindSafe for RedactionRules
impl Send for RedactionRules
impl Sync for RedactionRules
impl Unpin for RedactionRules
impl UnsafeUnpin for RedactionRules
impl UnwindSafe for RedactionRules
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