pub struct RedactLiterals { /* private fields */ }Expand description
Replace known secrets wherever they appear.
Literal matching, not patterns: a deployment knows its own credentials —
it just handed them to a
CredentialSource —
and matching what it knows cannot misfire the way a heuristic pattern can.
A regex that redacts something that merely looks like a token turns a
correct tool result into a confusing one.
Implementations§
Source§impl RedactLiterals
impl RedactLiterals
pub fn new(secrets: impl IntoIterator<Item = impl Into<String>>) -> Self
Trait Implementations§
Source§impl ToolResultTransformer for RedactLiterals
impl ToolResultTransformer for RedactLiterals
fn transform(&self, _call: &ToolCall, draft: &mut ToolResultDraft)
Auto Trait Implementations§
impl Forget for RedactLiterals
impl Freeze for RedactLiterals
impl Move for RedactLiterals
impl RefUnwindSafe for RedactLiterals
impl Send for RedactLiteralswhere
RawVecInner: Send,
impl Sync for RedactLiteralswhere
RawVecInner: Sync,
impl Unpin for RedactLiterals
impl UnsafeUnpin for RedactLiteralswhere
*const u8 is !null: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
impl UnwindSafe for RedactLiteralswhere
RawVecInner: UnwindSafe,
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