pub struct RedactionFloor { /* private fields */ }Expand description
Immutable minimum field-protection rules.
A floor contains sensitive-field rules, matching behavior, and an unknown-field fallback. It intentionally has no allow rules or mask table.
§Examples
use qubit_redact::RedactionFloor;
use qubit_redact::RedactionPolicy;
use qubit_redact::Sensitivity;
let floor = RedactionFloor::builder().raise("pin", Sensitivity::Secret)?.build()?;
let policy = RedactionPolicy::standard().with_floor(floor);
assert_eq!(policy.sensitivity_for("pin"), Some(Sensitivity::Secret));Implementations§
Source§impl RedactionFloor
impl RedactionFloor
Sourcepub fn builder() -> RedactionFloorBuilder
pub fn builder() -> RedactionFloorBuilder
Creates a deterministic empty floor builder.
Sourcepub fn sensitive_rules(&self) -> impl Iterator<Item = SensitiveFieldRule<'_>>
pub fn sensitive_rules(&self) -> impl Iterator<Item = SensitiveFieldRule<'_>>
Iterates the floor’s canonical sensitive rules.
Sourcepub fn to_builder(&self) -> RedactionFloorBuilder
pub fn to_builder(&self) -> RedactionFloorBuilder
Creates a floor builder by copying self exactly.
Trait Implementations§
Source§impl Clone for RedactionFloor
impl Clone for RedactionFloor
Source§fn clone(&self) -> RedactionFloor
fn clone(&self) -> RedactionFloor
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 RedactionFloor
impl Debug for RedactionFloor
Source§impl Default for RedactionFloor
impl Default for RedactionFloor
Source§impl Display for RedactionFloor
impl Display for RedactionFloor
impl Eq for RedactionFloor
Source§impl PartialEq for RedactionFloor
impl PartialEq for RedactionFloor
impl StructuralPartialEq for RedactionFloor
Auto Trait Implementations§
impl Freeze for RedactionFloor
impl RefUnwindSafe for RedactionFloor
impl Send for RedactionFloor
impl Sync for RedactionFloor
impl Unpin for RedactionFloor
impl UnsafeUnpin for RedactionFloor
impl UnwindSafe for RedactionFloor
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