pub enum Replacement {
Label,
Pseudonym,
Fixed(String),
}Expand description
What a detected span becomes.
Variants§
Label
[EMAIL], [PERSON] — the kind’s label (the default).
Pseudonym
[EMAIL_1], [EMAIL_2]: a number per distinct value within the
document, so the same e-mail reads as the same placeholder wherever it
recurs and two different ones stay apart — what a downstream reader
(or an LLM) needs to follow “who did what” with the names gone.
Fixed(String)
One fixed string for everything, e.g. █████ or ***.
Implementations§
Trait Implementations§
Source§impl Clone for Replacement
impl Clone for Replacement
Source§impl Debug for Replacement
impl Debug for Replacement
Source§impl Default for Replacement
impl Default for Replacement
impl Eq for Replacement
Source§impl PartialEq for Replacement
impl PartialEq for Replacement
impl StructuralPartialEq for Replacement
Auto Trait Implementations§
impl Freeze for Replacement
impl RefUnwindSafe for Replacement
impl Send for Replacement
impl Sync for Replacement
impl Unpin for Replacement
impl UnsafeUnpin for Replacement
impl UnwindSafe for Replacement
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
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.