#[non_exhaustive]pub struct RedactionEntry {Show 13 fields
pub source: String,
pub class: PiiClass,
pub action: Action,
pub field_name: Option<String>,
pub document_kind: DocumentKind,
pub conflict_loser: bool,
pub decided_by: ConflictTier,
pub created_at: i64,
pub session_id: Option<String>,
pub validator_fail_reason: Option<ValidatorFailReason>,
pub ambiguity_record: Option<AmbiguityRecord>,
pub collision_family: Option<String>,
pub collision_variant: Option<String>,
}Expand description
One row of redaction metadata emitted to a RedactionLogger.
Fields identify the PII class, action taken, session ID, source document kind, conflict-resolution metadata, and timestamp. Does not contain the original PII value, the token string, or any identifiable content beyond what a compliance audit requires.
RedactionEntry is #[non_exhaustive]; adopters must construct via the public
constructor or destructure with a wildcard pattern.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.source: StringDetector or recognizer source identifier.
class: PiiClassPII class affected by the decision.
action: ActionPolicy action applied to the span.
field_name: Option<String>Optional structured field name.
document_kind: DocumentKindSource document kind.
conflict_loser: boolWhether this entry records a loser in conflict resolution.
decided_by: ConflictTierConflict tier that decided the outcome.
created_at: i64Creation timestamp in epoch milliseconds.
session_id: Option<String>Optional session identifier.
validator_fail_reason: Option<ValidatorFailReason>Optional validator failure reason for a vetoed candidate.
ambiguity_record: Option<AmbiguityRecord>Optional ambiguity metadata for a family-level fallback.
collision_family: Option<String>Collision family that influenced this decision.
collision_variant: Option<String>Collision variant that influenced this decision.
Implementations§
Source§impl RedactionEntry
impl RedactionEntry
Sourcepub fn new(
source: impl Into<String>,
class: PiiClass,
action: Action,
field_name: Option<String>,
document_kind: DocumentKind,
conflict_loser: bool,
decided_by: ConflictTier,
created_at: i64,
session_id: Option<String>,
) -> Self
pub fn new( source: impl Into<String>, class: PiiClass, action: Action, field_name: Option<String>, document_kind: DocumentKind, conflict_loser: bool, decided_by: ConflictTier, created_at: i64, session_id: Option<String>, ) -> Self
Builds a metadata-only redaction log entry.
Sourcepub fn with_validator_fail_reason(self, reason: ValidatorFailReason) -> Self
pub fn with_validator_fail_reason(self, reason: ValidatorFailReason) -> Self
Attaches a validator failure reason to this metadata row.
Sourcepub fn with_ambiguity_record(self, record: AmbiguityRecord) -> Self
pub fn with_ambiguity_record(self, record: AmbiguityRecord) -> Self
Attaches an ambiguity record to this metadata row.
Trait Implementations§
Source§impl Clone for RedactionEntry
impl Clone for RedactionEntry
Source§fn clone(&self) -> RedactionEntry
fn clone(&self) -> RedactionEntry
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 RedactionEntry
impl Debug for RedactionEntry
Source§impl PartialEq for RedactionEntry
impl PartialEq for RedactionEntry
Source§fn eq(&self, other: &RedactionEntry) -> bool
fn eq(&self, other: &RedactionEntry) -> bool
self and other values to be equal, and is used by ==.impl Eq for RedactionEntry
impl StructuralPartialEq for RedactionEntry
Auto Trait Implementations§
impl Freeze for RedactionEntry
impl RefUnwindSafe for RedactionEntry
impl Send for RedactionEntry
impl Sync for RedactionEntry
impl Unpin for RedactionEntry
impl UnsafeUnpin for RedactionEntry
impl UnwindSafe for RedactionEntry
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more