pub struct Event {
pub id: EventId,
pub offset: EventOffset,
pub timestamp: DateTime<Utc>,
pub scope: EventScope,
pub event_type: EventType,
pub component_id: String,
pub status: ComponentStatus,
pub workflow_id: WorkflowId,
pub parent_workflow_id: Option<WorkflowId>,
pub message: Option<String>,
pub data: JsonValue,
}Expand description
An immutable event record
Fields§
§id: EventId§offset: EventOffset§timestamp: DateTime<Utc>§scope: EventScopeEvent scope (component type)
event_type: EventTypeEvent type (lifecycle stage)
component_id: StringComponent identifier (follows standardized format per scope)
status: ComponentStatusCurrent status of the component
workflow_id: WorkflowIdWorkflow context
parent_workflow_id: Option<WorkflowId>Optional parent workflow ID for nested workflows
message: Option<String>Optional human-readable message
data: JsonValueFlexible payload for component-specific data
Implementations§
Source§impl Event
impl Event
pub fn new( offset: EventOffset, scope: EventScope, event_type: EventType, component_id: String, status: ComponentStatus, workflow_id: WorkflowId, message: Option<String>, data: JsonValue, ) -> Result<Self, String>
pub fn with_parent( offset: EventOffset, scope: EventScope, event_type: EventType, component_id: String, status: ComponentStatus, workflow_id: WorkflowId, parent_workflow_id: Option<WorkflowId>, message: Option<String>, data: JsonValue, ) -> Result<Self, String>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Event
impl<'de> Deserialize<'de> for Event
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 Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnsafeUnpin for Event
impl UnwindSafe for Event
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