pub struct StepCompletedEvent {
pub run_id: Uuid,
pub step_id: Uuid,
pub step_name: String,
pub kind: StepKind,
pub duration_ms: u64,
pub cost_usd: Decimal,
pub at: DateTime<Utc>,
}Expand description
Payload of the Event::StepCompleted event.
§Examples
use chrono::Utc;
use ironflow_engine::notify::StepCompletedEvent;
use ironflow_store::models::StepKind;
use rust_decimal::Decimal;
use uuid::Uuid;
let payload = StepCompletedEvent {
run_id: Uuid::now_v7(),
step_id: Uuid::now_v7(),
step_name: "build".to_string(),
kind: StepKind::Shell,
duration_ms: 1200,
cost_usd: Decimal::ZERO,
at: Utc::now(),
};
assert_eq!(payload.step_name, "build");Fields§
§run_id: UuidRun identifier.
step_id: UuidStep identifier.
step_name: StringHuman-readable step name.
kind: StepKindStep operation kind.
duration_ms: u64Step duration in milliseconds.
cost_usd: DecimalStep cost in USD.
at: DateTime<Utc>When the step completed.
Trait Implementations§
Source§impl Clone for StepCompletedEvent
impl Clone for StepCompletedEvent
Source§impl Debug for StepCompletedEvent
impl Debug for StepCompletedEvent
Source§impl<'de> Deserialize<'de> for StepCompletedEvent
impl<'de> Deserialize<'de> for StepCompletedEvent
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 StepCompletedEvent
impl RefUnwindSafe for StepCompletedEvent
impl Send for StepCompletedEvent
impl Sync for StepCompletedEvent
impl Unpin for StepCompletedEvent
impl UnsafeUnpin for StepCompletedEvent
impl UnwindSafe for StepCompletedEvent
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