pub struct DecisionGate { /* private fields */ }Expand description
Lightweight pre-check that runs before save()/search() to skip trivial messages.
Implementations§
Source§impl DecisionGate
impl DecisionGate
pub fn new(config: GateConfig) -> Self
Sourcepub fn should_save(&self, text: &str) -> SaveDecision
pub fn should_save(&self, text: &str) -> SaveDecision
Check if a message should be saved to memory.
Sourcepub fn should_search(&self, text: &str) -> SearchDecision
pub fn should_search(&self, text: &str) -> SearchDecision
Check if a query should trigger a memory search.
Auto Trait Implementations§
impl Freeze for DecisionGate
impl RefUnwindSafe for DecisionGate
impl Send for DecisionGate
impl Sync for DecisionGate
impl Unpin for DecisionGate
impl UnsafeUnpin for DecisionGate
impl UnwindSafe for DecisionGate
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more