pub struct Redactor { /* private fields */ }Expand description
Output redactor that scrubs API keys, tokens, emails, and sensitive JSON keys from MCP tool output. Applies built-in patterns plus optional custom regexes.
Implementations§
Source§impl Redactor
impl Redactor
Sourcepub fn try_new(custom_patterns: &[String]) -> Result<Self, Error>
pub fn try_new(custom_patterns: &[String]) -> Result<Self, Error>
Build a redactor with custom patterns.
§Errors
Returns regex::Error if any custom pattern (or a built-in pattern) fails to compile.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Redactor
impl RefUnwindSafe for Redactor
impl Send for Redactor
impl Sync for Redactor
impl Unpin for Redactor
impl UnsafeUnpin for Redactor
impl UnwindSafe for Redactor
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