pub struct RedactionReport {
pub counts: BTreeMap<String, usize>,
pub total: usize,
pub mapping: Option<Vec<(String, String)>>,
}Expand description
What was redacted: one count per label (EMAIL, PHONE, a custom
pattern’s name, REDACTED for deny terms), the total, and — only with
RedactionOptions::return_mapping — the original → placeholder
pairs. A backend that also builds docling’s item tree (DOCX, HTML) has
its text redacted in both representations but counted once.
Fields§
§counts: BTreeMap<String, usize>§total: usize§mapping: Option<Vec<(String, String)>>Implementations§
Source§impl RedactionReport
impl RedactionReport
Sourcepub fn counts_json(&self) -> Value
pub fn counts_json(&self) -> Value
The counts as a JSON object ({"EMAIL": 2, "PHONE": 1}), what the
HTTP surfaces answer with — never the mapping.
Trait Implementations§
Source§impl Clone for RedactionReport
impl Clone for RedactionReport
Source§impl Debug for RedactionReport
impl Debug for RedactionReport
Source§impl Default for RedactionReport
impl Default for RedactionReport
impl Eq for RedactionReport
Source§impl PartialEq for RedactionReport
impl PartialEq for RedactionReport
impl StructuralPartialEq for RedactionReport
Auto Trait Implementations§
impl Freeze for RedactionReport
impl RefUnwindSafe for RedactionReport
impl Send for RedactionReport
impl Sync for RedactionReport
impl Unpin for RedactionReport
impl UnsafeUnpin for RedactionReport
impl UnwindSafe for RedactionReport
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.