#[non_exhaustive]pub enum CleanDocument {
Structured(BTreeMap<String, Value>),
Text(String),
}Expand description
The pseudonymized output from Pipeline::redact.
Mirrors the shape of RawDocument: CleanDocument::Text(String) or
CleanDocument::Structured(BTreeMap<String, Value>). Destructure with a let-else
or match; there is no .text() accessor.
use gaze_types::CleanDocument;
fn unwrap_text(doc: CleanDocument) -> Option<String> {
if let CleanDocument::Text(t) = doc { Some(t) } else { None }
}Contains only tokens or redacted placeholders – no original PII values.
Send this (or its inner string) to the LLM; never send the original RawDocument.
CleanDocument is #[non_exhaustive].
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Trait Implementations§
Source§impl Clone for CleanDocument
impl Clone for CleanDocument
Source§fn clone(&self) -> CleanDocument
fn clone(&self) -> CleanDocument
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 CleanDocument
impl Debug for CleanDocument
Source§impl Serialize for CleanDocument
impl Serialize for CleanDocument
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for CleanDocument
impl RefUnwindSafe for CleanDocument
impl Send for CleanDocument
impl Sync for CleanDocument
impl Unpin for CleanDocument
impl UnsafeUnpin for CleanDocument
impl UnwindSafe for CleanDocument
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