Struct TurnMemory
pub struct TurnMemory<'a> {
pub handle: &'a dyn Memory,
pub query: String,
pub sessions: Vec<Option<String>>,
pub suppress: bool,
pub cfg: MemoryInjectConfig,
}Expand description
The per-turn memory half carried on ToolLoop: the handle plus the
recall inputs only the entry point knows. Entry points that own a memory
pass Some; nested sub-turn sites pass None.
Fields§
§handle: &'a dyn MemoryThe agent’s memory backend for this turn.
query: StringThe RAW user message to recall against (before any timestamp or site-added prefix reaches the history message).
sessions: Vec<Option<String>>Session scopes to recall from (multi-scope recalls are key-deduped in order). Empty means one unscoped recall.
suppress: boolSpawn-site opt-out (e.g. a cron job with uses_memory = false).
cfg: MemoryInjectConfigThe stable config half (limits, relevance floor, budgets).
Auto Trait Implementations§
impl<'a> Freeze for TurnMemory<'a>
impl<'a> !RefUnwindSafe for TurnMemory<'a>
impl<'a> Send for TurnMemory<'a>
impl<'a> Sync for TurnMemory<'a>
impl<'a> Unpin for TurnMemory<'a>
impl<'a> UnsafeUnpin for TurnMemory<'a>
impl<'a> !UnwindSafe for TurnMemory<'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
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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