pub struct MemoryQuery {
pub tags: Vec<String>,
pub min_importance: Option<f32>,
pub max_importance: Option<f32>,
pub created_after: Option<DateTime<Utc>>,
pub created_before: Option<DateTime<Utc>>,
pub content_substring: Option<String>,
pub limit: usize,
}Expand description
Query filter for memories.
Fields§
Filter by tags (memory must contain ALL specified tags).
min_importance: Option<f32>Minimum importance (inclusive).
max_importance: Option<f32>Maximum importance (inclusive).
created_after: Option<DateTime<Utc>>Only memories created after this timestamp.
created_before: Option<DateTime<Utc>>Only memories created before this timestamp.
content_substring: Option<String>Case-insensitive substring filter over content (literal match — not tokenized or ranked; that is what the search engine is for).
limit: usizeMaximum number of results.
Implementations§
Source§impl MemoryQuery
impl MemoryQuery
Set tag filter.
Sourcepub const fn with_importance_range(self, min: f32, max: f32) -> Self
pub const fn with_importance_range(self, min: f32, max: f32) -> Self
Set importance range.
Sourcepub const fn with_time_range(
self,
after: DateTime<Utc>,
before: DateTime<Utc>,
) -> Self
pub const fn with_time_range( self, after: DateTime<Utc>, before: DateTime<Utc>, ) -> Self
Set temporal range.
Sourcepub const fn with_created_after(self, after: DateTime<Utc>) -> Self
pub const fn with_created_after(self, after: DateTime<Utc>) -> Self
One-sided temporal bound: only memories created at or after this
timestamp (created_after API passthrough).
Sourcepub const fn with_created_before(self, before: DateTime<Utc>) -> Self
pub const fn with_created_before(self, before: DateTime<Utc>) -> Self
One-sided temporal bound: only memories created at or before this
timestamp (created_before API passthrough).
Sourcepub const fn with_limit(self, limit: usize) -> Self
pub const fn with_limit(self, limit: usize) -> Self
Set limit.
Sourcepub fn with_content_substring(self, substring: impl Into<String>) -> Self
pub fn with_content_substring(self, substring: impl Into<String>) -> Self
Set a case-insensitive substring filter over content.
Trait Implementations§
Source§impl Clone for MemoryQuery
impl Clone for MemoryQuery
Source§impl Debug for MemoryQuery
impl Debug for MemoryQuery
Auto Trait Implementations§
impl Freeze for MemoryQuery
impl RefUnwindSafe for MemoryQuery
impl Send for MemoryQuery
impl Sync for MemoryQuery
impl Unpin for MemoryQuery
impl UnsafeUnpin for MemoryQuery
impl UnwindSafe for MemoryQuery
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> Fruit for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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