pub struct SessionTurnMetadata {
pub applied_personality_id: Option<String>,
pub applied_personality_prompt_hash: Option<String>,
pub instruction_conversation_id: Option<String>,
pub model: String,
pub provider_conversation_id: Option<String>,
pub questions_json: String,
pub summary: String,
pub token_usage_delta: SessionStats,
}Expand description
Transactional turn-metadata payload persisted after one completed agent turn.
Owns its fields so the persistence trait method stays lifetime-free. A
borrowed variant (SessionTurnMetadata<'a>) forced the persist method to
carry a generic lifetime, which mockall::automock drops in the generated
mock and newer clippy then rejects via extra_unused_lifetimes. Owning
the data is allocation-cheap on this once-per-turn path and keeps the trait
signature stable across toolchains.
Fields§
§applied_personality_id: Option<String>Personality id successfully delivered for this turn, or None when
the turn cleared or had no personality.
applied_personality_prompt_hash: Option<String>Fingerprint of the personality prompt successfully delivered for this turn.
instruction_conversation_id: Option<String>Session-scoped instruction bootstrap marker for app-server providers.
model: StringModel identifier used for per-model usage aggregation.
provider_conversation_id: Option<String>Persisted provider-native conversation identifier for future resumes.
questions_json: StringSerialized clarification-question payload stored on the session row.
summary: StringSerialized structured summary payload stored on the session row.
token_usage_delta: SessionStatsToken-usage delta attributed to the completed turn.
Auto Trait Implementations§
impl Freeze for SessionTurnMetadata
impl RefUnwindSafe for SessionTurnMetadata
impl Send for SessionTurnMetadata
impl Sync for SessionTurnMetadata
impl Unpin for SessionTurnMetadata
impl UnsafeUnpin for SessionTurnMetadata
impl UnwindSafe for SessionTurnMetadata
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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> ⓘ
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> ⓘ
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