pub struct ExecutionEvent {
pub event_id: String,
pub event_type: ExecutionEventType,
pub context: ExecutionContext,
pub timestamp: DateTime<Utc>,
pub duration_ms: Option<u64>,
pub payload: Option<Value>,
}Expand description
ExecutionEvent - Base event schema for all execution events
All events include execution context for traceability.
Fields§
§event_id: StringUnique event ID
event_type: ExecutionEventTypeEvent type
context: ExecutionContextExecution context
timestamp: DateTime<Utc>Timestamp
duration_ms: Option<u64>Duration in milliseconds (for start/end pairs)
payload: Option<Value>Event-specific payload
Implementations§
Source§impl ExecutionEvent
impl ExecutionEvent
Sourcepub fn new(event_type: ExecutionEventType, context: ExecutionContext) -> Self
pub fn new(event_type: ExecutionEventType, context: ExecutionContext) -> Self
Create a new ExecutionEvent
Sourcepub fn with_duration(self, ms: u64) -> Self
pub fn with_duration(self, ms: u64) -> Self
Add duration
Sourcepub fn with_payload(self, payload: Value) -> Self
pub fn with_payload(self, payload: Value) -> Self
Add payload
Sourcepub fn execution_start(
execution_id: ExecutionId,
parent: Option<ParentLink>,
) -> Self
pub fn execution_start( execution_id: ExecutionId, parent: Option<ParentLink>, ) -> Self
Create an execution.start event
Sourcepub fn execution_end(
execution_id: ExecutionId,
duration_ms: Option<u64>,
) -> Self
pub fn execution_end( execution_id: ExecutionId, duration_ms: Option<u64>, ) -> Self
Create an execution.end event
Sourcepub fn step_start(
execution_id: ExecutionId,
step_id: StepId,
step_type: StepType,
name: &str,
) -> Self
pub fn step_start( execution_id: ExecutionId, step_id: StepId, step_type: StepType, name: &str, ) -> Self
Create a step.start event
Sourcepub fn step_end(
execution_id: ExecutionId,
step_id: StepId,
duration_ms: u64,
) -> Self
pub fn step_end( execution_id: ExecutionId, step_id: StepId, duration_ms: u64, ) -> Self
Create a step.end event
Sourcepub fn artifact_created(
execution_id: ExecutionId,
step_id: StepId,
artifact_id: ArtifactId,
artifact_type: &str,
) -> Self
pub fn artifact_created( execution_id: ExecutionId, step_id: StepId, artifact_id: ArtifactId, artifact_type: &str, ) -> Self
Create an artifact.created event
Trait Implementations§
Source§impl Clone for ExecutionEvent
impl Clone for ExecutionEvent
Source§fn clone(&self) -> ExecutionEvent
fn clone(&self) -> ExecutionEvent
Returns a duplicate of the value. Read more
1.0.0 · 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 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
Auto Trait Implementations§
impl Freeze 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