pub enum ExecutionEvent {
TaskStarted {
task_id: String,
trace_id: String,
envelope_ref: String,
timestamp: String,
sequence_number: u64,
prev_hash: String,
},
PlanCreated {
task_id: String,
trace_id: String,
plan_id: String,
plan_ref: String,
timestamp: String,
sequence_number: u64,
prev_hash: String,
},
ContextDelivered {
task_id: String,
trace_id: String,
context_balance: ContextBalanceV1,
timestamp: String,
sequence_number: u64,
prev_hash: String,
},
ModelInvoked {Show 13 fields
task_id: String,
trace_id: String,
plan_id: String,
invocation_id: String,
invocation_ref: String,
model: String,
provider: String,
tokens_in: u64,
tokens_out: u64,
latency_ms: u64,
timestamp: String,
sequence_number: u64,
prev_hash: String,
},
EngineInvoked {
task_id: String,
trace_id: String,
plan_id: String,
invocation_id: String,
invocation_ref: String,
capability_id: String,
capability_version: String,
timestamp: String,
sequence_number: u64,
prev_hash: String,
},
ReceiptSigned {
task_id: String,
trace_id: String,
receipt_id: String,
receipt_hash: String,
signature: String,
timestamp: String,
sequence_number: u64,
prev_hash: String,
},
CanonicalReceiptRecorded {Show 14 fields
task_id: String,
trace_id: String,
invocation_id: String,
receipt_id: String,
receipt_ref: String,
receipt_digest: String,
receipt_chain_id: String,
receipt_sequence_number: u64,
previous_receipt_id: Option<String>,
previous_signature_digest: Option<String>,
timestamp: String,
sequence_number: u64,
prev_hash: String,
entry_hash: String,
},
OutcomeRecorded {
task_id: String,
trace_id: String,
outcome_id: String,
receipt_id: String,
accepted: TriState,
timestamp: String,
sequence_number: u64,
prev_hash: String,
},
DecisionRecorded {
task_id: String,
trace_id: String,
decision_id: String,
kind: String,
selected: String,
timestamp: String,
sequence_number: u64,
prev_hash: String,
},
}Expand description
One append-only observation in the execution ledger.
Variants§
TaskStarted
Fields
PlanCreated
Fields
ContextDelivered
Fields
§
context_balance: ContextBalanceV1ModelInvoked
Fields
EngineInvoked
Fields
ReceiptSigned
Fields
CanonicalReceiptRecorded
Fields
OutcomeRecorded
Fields
DecisionRecorded
Implementations§
Source§impl ExecutionEvent
impl ExecutionEvent
Sourcepub const fn sequence_number(&self) -> u64
pub const fn sequence_number(&self) -> u64
Returns the event’s chain sequence number.
Sourcepub fn prev_hash(&self) -> &str
pub fn prev_hash(&self) -> &str
Returns the hash of the preceding event recorded on this event.
Sourcepub fn canonical_json(&self) -> Result<String>
pub fn canonical_json(&self) -> Result<String>
Serializes the event in compact canonical JSON form.
Struct and enum field order is fixed by the Rust declaration and
serde_json::to_string emits no insignificant whitespace, giving the
ledger a stable byte representation without relying on map iteration order.
Sourcepub fn event_hash(&self) -> Result<String>
pub fn event_hash(&self) -> Result<String>
Computes this event’s chain hash using the Savings Ledger SHA-256 primitive.
Trait Implementations§
Source§impl Clone for ExecutionEvent
impl Clone for ExecutionEvent
Source§impl Debug for ExecutionEvent
impl Debug for ExecutionEvent
Source§impl<'de> Deserialize<'de> for ExecutionEvent
impl<'de> Deserialize<'de> for ExecutionEvent
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
Source§impl PartialEq for ExecutionEvent
impl PartialEq for ExecutionEvent
Source§impl Serialize for ExecutionEvent
impl Serialize for ExecutionEvent
impl StructuralPartialEq for ExecutionEvent
Auto Trait Implementations§
impl Forget for ExecutionEvent
impl Freeze for ExecutionEvent
impl Move for ExecutionEvent
impl RefUnwindSafe for ExecutionEvent
impl Send for ExecutionEvent
impl Sync for ExecutionEvent
impl Unpin for ExecutionEvent
impl UnsafeUnpin for ExecutionEvent
impl UnwindSafe for ExecutionEvent
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>,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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> ⓘ
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