pub struct EngineEventData {
pub timestamp: u64,
pub run_id: String,
pub event: EngineEvent,
}Expand description
A single workflow engine event with timestamp and run identity.
Fields§
§timestamp: u64Unix timestamp (seconds) when the event was emitted.
run_id: StringThe workflow run ID this event belongs to.
event: EngineEventThe event payload.
Implementations§
Source§impl EngineEventData
impl EngineEventData
Sourcepub fn new(run_id: String, event: EngineEvent) -> Self
pub fn new(run_id: String, event: EngineEvent) -> Self
Examples found in repository?
examples/stdout_event_sink.rs (lines 37-42)
34fn main() {
35 let sink = StdoutEventSink;
36
37 sink.emit(&EngineEventData::new(
38 "run-001".into(),
39 EngineEvent::RunStarted {
40 workflow_name: "my-workflow".into(),
41 },
42 ));
43 sink.emit(&EngineEventData::new(
44 "run-001".into(),
45 EngineEvent::RunCompleted { succeeded: true },
46 ));
47
48 // Wire it into a FlowEngine (builder shown; engine not actually run here):
49 let _engine = FlowEngineBuilder::new()
50 .event_sink(Box::new(StdoutEventSink))
51 .build()
52 .expect("engine build failed");
53 println!("engine built with StdoutEventSink attached");
54}Trait Implementations§
Source§impl Clone for EngineEventData
impl Clone for EngineEventData
Source§fn clone(&self) -> EngineEventData
fn clone(&self) -> EngineEventData
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for EngineEventData
impl RefUnwindSafe for EngineEventData
impl Send for EngineEventData
impl Sync for EngineEventData
impl Unpin for EngineEventData
impl UnsafeUnpin for EngineEventData
impl UnwindSafe for EngineEventData
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