pub struct PiiInputProcessor { /* private fields */ }Expand description
PII Input Processor
Detects PII in user input before sending to LLM.
Behavior is configurable via PiiInputMode.
(Full PII detection requires the optional enact-guardrails crate and guardrails feature.)
Implementations§
Source§impl PiiInputProcessor
impl PiiInputProcessor
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new PII input processor (no-op without enact-guardrails; always allows input)
Sourcepub fn with_mode(self, mode: PiiInputMode) -> Self
pub fn with_mode(self, mode: PiiInputMode) -> Self
Set the detection mode
Trait Implementations§
Source§impl Default for PiiInputProcessor
impl Default for PiiInputProcessor
Source§impl InputProcessor for PiiInputProcessor
impl InputProcessor for PiiInputProcessor
Source§fn process<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_input: &'life1 str,
_ctx: &'life2 PolicyContext,
) -> Pin<Box<dyn Future<Output = Result<InputProcessorResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn process<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_input: &'life1 str,
_ctx: &'life2 PolicyContext,
) -> Pin<Box<dyn Future<Output = Result<InputProcessorResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Process input before execution Read more
Auto Trait Implementations§
impl Freeze for PiiInputProcessor
impl RefUnwindSafe for PiiInputProcessor
impl Send for PiiInputProcessor
impl Sync for PiiInputProcessor
impl Unpin for PiiInputProcessor
impl UnsafeUnpin for PiiInputProcessor
impl UnwindSafe for PiiInputProcessor
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