#[non_exhaustive]pub struct RedactionEntry {
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>,
}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.
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>,
) -> RedactionEntry
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>, ) -> RedactionEntry
Builds a metadata-only redaction log entry.
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.