pub trait IntoFilter:
MemoryPolicy
+ Sized
+ 'static {
// Provided method
fn into_filter(self) -> BoxedFilter { ... }
}Expand description
Adapt a MemoryPolicy into a closure suitable for
InMemoryConversationMemory::with_filter.
Errors raised by the policy are swallowed because with_filter does not
propagate failures. Use MemoryPolicy::apply directly when you need to
observe policy errors.
Provided Methods§
Sourcefn into_filter(self) -> BoxedFilter
fn into_filter(self) -> BoxedFilter
Convert this policy into a filter closure.
On policy error the original input is returned unchanged and a
tracing::warn! is emitted, so a transient policy bug degrades
gracefully (the model still sees the unfiltered history) instead of
silently erasing context.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".