pub struct GoalRecord {
pub objective: String,
pub created_at_ms: i64,
pub updated_at_ms: i64,
}Expand description
The session’s persistent objective.
Fields§
§objective: StringThe objective, as the user stated it.
created_at_ms: i64Unix-ms wall-clock time the goal was first set.
updated_at_ms: i64Unix-ms wall-clock time it was last changed.
Implementations§
Source§impl GoalRecord
impl GoalRecord
Sourcepub fn revise(&mut self, objective: impl Into<String>, now_ms: i64)
pub fn revise(&mut self, objective: impl Into<String>, now_ms: i64)
Replace the objective, keeping created_at_ms — the goal’s identity
is the session’s, not the sentence’s, so a reworded goal is the same
goal refined, not a new one.
Sourcepub fn reminder(&self) -> String
pub fn reminder(&self) -> String
The block spliced into the tail of every request while this goal stands. Deliberately at the TAIL, not the system prompt: a standing objective is only useful if it is the last thing the model reads before the current turn, and appending never disturbs the cached prefix.
Trait Implementations§
Source§impl Clone for GoalRecord
impl Clone for GoalRecord
Source§fn clone(&self) -> GoalRecord
fn clone(&self) -> GoalRecord
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 GoalRecord
impl Debug for GoalRecord
Source§impl<'de> Deserialize<'de> for GoalRecord
impl<'de> Deserialize<'de> for GoalRecord
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for GoalRecord
Source§impl PartialEq for GoalRecord
impl PartialEq for GoalRecord
Source§impl Serialize for GoalRecord
impl Serialize for GoalRecord
impl StructuralPartialEq for GoalRecord
Auto Trait Implementations§
impl Freeze for GoalRecord
impl RefUnwindSafe for GoalRecord
impl Send for GoalRecord
impl Sync for GoalRecord
impl Unpin for GoalRecord
impl UnsafeUnpin for GoalRecord
impl UnwindSafe for GoalRecord
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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§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.