pub struct CoOccurrence {
pub when: String,
pub near: String,
pub within_chars: usize,
pub as_category: String,
}Expand description
“Redact category A when category B appears within N characters.”
Expressed as a RE-CATEGORIZATION rather than a bare action override: the
matching detection takes as_category, and the policy’s ordinary
categories map then decides what happens to it. That keeps one place
where actions are decided, and it makes the output self-explaining — the
placeholder says [PHI_1] rather than [PERSON_1], so a reader can see
WHY the span was treated more strictly than a bare name would be.
Fields§
§when: StringThe category to escalate (e.g. person).
near: StringThe category whose nearby presence triggers it (e.g. condition,
usually supplied via AnonPolicy::term_sets).
within_chars: usizeProximity window in characters, measured between span edges.
as_category: StringThe category the when detection takes on when the rule fires.
Trait Implementations§
Source§impl Clone for CoOccurrence
impl Clone for CoOccurrence
Source§fn clone(&self) -> CoOccurrence
fn clone(&self) -> CoOccurrence
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 CoOccurrence
impl Debug for CoOccurrence
Source§impl<'de> Deserialize<'de> for CoOccurrence
impl<'de> Deserialize<'de> for CoOccurrence
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for CoOccurrence
impl PartialEq for CoOccurrence
Source§impl Serialize for CoOccurrence
impl Serialize for CoOccurrence
impl StructuralPartialEq for CoOccurrence
Auto Trait Implementations§
impl Freeze for CoOccurrence
impl RefUnwindSafe for CoOccurrence
impl Send for CoOccurrence
impl Sync for CoOccurrence
impl Unpin for CoOccurrence
impl UnsafeUnpin for CoOccurrence
impl UnwindSafe for CoOccurrence
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