#[non_exhaustive]pub struct TurnIdentifiers {Show 16 fields
pub turn_id: Option<TurnId>,
pub conversation_id: Option<ConversationId>,
pub account_hash: Option<String>,
pub workflow: Option<WorkflowKey>,
pub workflow_version: Option<WorkflowVersion>,
pub case_id: Option<CaseId>,
pub case_revision: Option<CaseRevision>,
pub interaction_id: Option<InteractionId>,
pub provider: Option<String>,
pub model: Option<String>,
pub attempt: Option<String>,
pub plan_hash: Option<Digest>,
pub command_id: Option<CommandId>,
pub event_ids: Vec<EventId>,
pub block_ids: Vec<BlockId>,
pub outbox_id: Option<OutboxId>,
}Expand description
The stable identifiers of one turn (spec §26.1).
Every member is an identifier, a version label or a digest. Build one with
TurnIdentifiers::of_turn and fill in what a stage knows, or derive a
whole one from a persisted ReplayRecord with
TurnIdentifiers::from_replay.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.turn_id: Option<TurnId>The turn.
conversation_id: Option<ConversationId>The conversation the turn belongs to.
account_hash: Option<String>Digest of the tenant, from account_hash. Never the raw account id.
workflow: Option<WorkflowKey>Workflow in force.
workflow_version: Option<WorkflowVersion>Version of that workflow.
case_id: Option<CaseId>Case the turn acted on.
case_revision: Option<CaseRevision>Revision that case was loaded at.
interaction_id: Option<InteractionId>Interaction created or answered.
provider: Option<String>Provider key of the model call.
model: Option<String>Model key of the model call.
attempt: Option<String>Attempt within the stage.
plan_hash: Option<Digest>Hash of the accepted, normalized plan.
command_id: Option<CommandId>Command the event concerns.
event_ids: Vec<EventId>Events committed by the turn.
block_ids: Vec<BlockId>Response block ids, in order.
outbox_id: Option<OutboxId>Outbox row of an external side effect.
Implementations§
Source§impl TurnIdentifiers
impl TurnIdentifiers
Sourcepub fn of_turn(
turn_id: TurnId,
conversation_id: ConversationId,
account_id: &AccountId,
) -> Self
pub fn of_turn( turn_id: TurnId, conversation_id: ConversationId, account_id: &AccountId, ) -> Self
The identifiers every stage of a turn knows.
Sourcepub fn from_replay(record: &ReplayRecord) -> Self
pub fn from_replay(record: &ReplayRecord) -> Self
Everything spec §26.1 asks for that a persisted replay record holds.
The workflow, case and interaction taken are the first of each list and the provider attempt the last, which is the one a failure concerns; the full lists stay in the replay record itself.
Trait Implementations§
Source§impl Clone for TurnIdentifiers
impl Clone for TurnIdentifiers
Source§impl Debug for TurnIdentifiers
impl Debug for TurnIdentifiers
Source§impl Default for TurnIdentifiers
impl Default for TurnIdentifiers
impl Eq for TurnIdentifiers
Source§impl PartialEq for TurnIdentifiers
impl PartialEq for TurnIdentifiers
impl StructuralPartialEq for TurnIdentifiers
Auto Trait Implementations§
impl Freeze for TurnIdentifiers
impl RefUnwindSafe for TurnIdentifiers
impl Send for TurnIdentifiers
impl Sync for TurnIdentifiers
impl Unpin for TurnIdentifiers
impl UnsafeUnpin for TurnIdentifiers
impl UnwindSafe for TurnIdentifiers
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
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,
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.