pub trait ContentRedactor:
Send
+ Sync
+ Debug {
// Required method
fn redact(&self, role: ContentRole, text: &str) -> Option<String>;
}Expand description
Decides what, if anything, of a prompt or completion may be recorded.
The hook is mandatory: content recording cannot be switched on without one,
so there is no configuration in which raw user text reaches the backend
unexamined. Returning None drops the content entirely.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".