pub struct RecallOptions<'a> {
pub scope: Option<&'a str>,
pub kind: Option<MemoryKind>,
pub anchor_key: Option<&'a str>,
pub query: Option<&'a str>,
pub decay: Decay,
pub applicable_only: bool,
pub limit: Option<usize>,
}Expand description
How to recall.
RecallOptions::default is every live record, ranked, with no age term —
the reproducible answer.
Fields§
§scope: Option<&'a str>Only records recorded in this namespace, matched exactly.
kind: Option<MemoryKind>Only records of this kind.
anchor_key: Option<&'a str>Only records anchored to this node key.
query: Option<&'a str>Every whitespace-separated token must appear in the record’s body, its anchor key or its anchor path (case-insensitively). A filter, not a scorer: the ranking formula has no lexical term, so which records come back can depend on the query while how they are ranked cannot.
decay: DecayHow age is priced in. Defaults to Decay::None — reproducible recall.
applicable_only: boolDrop records that do not apply to this tree. Off by default: an unanchored or drifted record is demoted and labelled, not withheld, and a lesson about deleted code is often the one worth reading.
limit: Option<usize>At most this many records, applied after ranking so a limit returns the best matches rather than the newest ones.
None and Some(0) are the same request: every record. 0 is
unlimited here because window is the one place that decides what
limit means in this crate, and that is what it decides (issue #375).
Recall used to read Some(0) as no records — the third implementation
of one parameter that window’s doc warned about, and issue #447.
Trait Implementations§
Source§impl<'a> Clone for RecallOptions<'a>
impl<'a> Clone for RecallOptions<'a>
Source§fn clone(&self) -> RecallOptions<'a>
fn clone(&self) -> RecallOptions<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl<'a> Copy for RecallOptions<'a>
Source§impl<'a> Debug for RecallOptions<'a>
impl<'a> Debug for RecallOptions<'a>
Source§impl<'a> Default for RecallOptions<'a>
impl<'a> Default for RecallOptions<'a>
Source§fn default() -> RecallOptions<'a>
fn default() -> RecallOptions<'a>
impl<'a> Eq for RecallOptions<'a>
Source§impl<'a> PartialEq for RecallOptions<'a>
impl<'a> PartialEq for RecallOptions<'a>
impl<'a> StructuralPartialEq for RecallOptions<'a>
Auto Trait Implementations§
impl<'a> Freeze for RecallOptions<'a>
impl<'a> RefUnwindSafe for RecallOptions<'a>
impl<'a> Send for RecallOptions<'a>
impl<'a> Sync for RecallOptions<'a>
impl<'a> Unpin for RecallOptions<'a>
impl<'a> UnsafeUnpin for RecallOptions<'a>
impl<'a> UnwindSafe for RecallOptions<'a>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.