pub struct GranularityBudgetItem {
pub id: String,
pub granularity: Option<TemporalGranularity>,
pub rendered: String,
}Expand description
One memory’s already-rendered contribution to a recalled-memory prompt section,
tagged with the temporal granularity that decides which side of the prefix/
suffix split it lands on (issue #61). rendered is whatever markdown/text form
the caller uses for a single recalled memory (title, summary, freshness note,
…) — this module only cares about the granularity tag and the resulting char
cost, not the rendering format.
Callers are expected to pass items in priority order (e.g. recall’s relevance
ranking — see recall::sort_recall_candidates); this module preserves that
relative order within each of the two output segments.
Fields§
§id: String§granularity: Option<TemporalGranularity>§rendered: StringImplementations§
Trait Implementations§
Source§impl Clone for GranularityBudgetItem
impl Clone for GranularityBudgetItem
Source§fn clone(&self) -> GranularityBudgetItem
fn clone(&self) -> GranularityBudgetItem
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GranularityBudgetItem
impl Debug for GranularityBudgetItem
impl Eq for GranularityBudgetItem
Source§impl PartialEq for GranularityBudgetItem
impl PartialEq for GranularityBudgetItem
impl StructuralPartialEq for GranularityBudgetItem
Auto Trait Implementations§
impl Freeze for GranularityBudgetItem
impl RefUnwindSafe for GranularityBudgetItem
impl Send for GranularityBudgetItem
impl Sync for GranularityBudgetItem
impl Unpin for GranularityBudgetItem
impl UnsafeUnpin for GranularityBudgetItem
impl UnwindSafe for GranularityBudgetItem
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> 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§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
Compare self to
key and return true if they are equal.