pub struct MemoryFilter<'a> {
pub scope: Option<&'a str>,
pub kind: Option<MemoryKind>,
pub anchor_key: Option<&'a str>,
pub include_superseded: bool,
pub limit: Option<usize>,
}Expand description
A narrowing filter for crate::Store::memory_records.
MemoryFilter::default is live records only, newest generation first, no
limit — the listing an agent actually wants, with superseded knowledge
already gone.
Fields§
§scope: Option<&'a str>Only records recorded in this scope, matched exactly.
kind: Option<MemoryKind>Only records of this kind.
anchor_key: Option<&'a str>Only records anchored to this node key.
include_superseded: boolAlso return records another record has superseded. Off by default: a superseded record drops out of live listing immediately, and the chain is kept for audit rather than for reading.
limit: Option<usize>At most this many records (the newest generations). None for all of
them — and so is Some(0), which is window’s reading of 0 holding
on the one list surface in this module that cannot call it, because the
cut happens in SQL. Sharing the rule is the point; LIMIT 0 returning
nothing would be the same divergence issue #447 was filed for, one
function away.
Trait Implementations§
Source§impl<'a> Clone for MemoryFilter<'a>
impl<'a> Clone for MemoryFilter<'a>
Source§fn clone(&self) -> MemoryFilter<'a>
fn clone(&self) -> MemoryFilter<'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 MemoryFilter<'a>
Source§impl<'a> Debug for MemoryFilter<'a>
impl<'a> Debug for MemoryFilter<'a>
Source§impl<'a> Default for MemoryFilter<'a>
impl<'a> Default for MemoryFilter<'a>
Source§fn default() -> MemoryFilter<'a>
fn default() -> MemoryFilter<'a>
impl<'a> Eq for MemoryFilter<'a>
Source§impl<'a> PartialEq for MemoryFilter<'a>
impl<'a> PartialEq for MemoryFilter<'a>
impl<'a> StructuralPartialEq for MemoryFilter<'a>
Auto Trait Implementations§
impl<'a> Freeze for MemoryFilter<'a>
impl<'a> RefUnwindSafe for MemoryFilter<'a>
impl<'a> Send for MemoryFilter<'a>
impl<'a> Sync for MemoryFilter<'a>
impl<'a> Unpin for MemoryFilter<'a>
impl<'a> UnsafeUnpin for MemoryFilter<'a>
impl<'a> UnwindSafe for MemoryFilter<'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.