pub struct TriggerEvent {
pub workflow_name: String,
pub payload: Value,
pub trigger_kind: TriggerKind,
}Expand description
A request to create a workflow run, emitted by a Trigger.
§Examples
use ironflow_runtime::trigger::TriggerEvent;
use ironflow_store::entities::TriggerKind;
use serde_json::json;
let event = TriggerEvent {
workflow_name: "rollback".to_string(),
payload: json!({"source": "deploy"}),
trigger_kind: TriggerKind::Manual,
};
assert_eq!(event.workflow_name, "rollback");Fields§
§workflow_name: StringThe workflow to run.
payload: ValuePayload passed to the new run.
trigger_kind: TriggerKindHow the run was triggered (stored on the run record).
Trait Implementations§
Source§impl Clone for TriggerEvent
impl Clone for TriggerEvent
Source§fn clone(&self) -> TriggerEvent
fn clone(&self) -> TriggerEvent
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 TriggerEvent
impl RefUnwindSafe for TriggerEvent
impl Send for TriggerEvent
impl Sync for TriggerEvent
impl Unpin for TriggerEvent
impl UnsafeUnpin for TriggerEvent
impl UnwindSafe for TriggerEvent
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