pub enum TriggerResult {
Skip,
Fire(Option<Context<Value>>),
}Expand description
Result of a trigger poll operation.
Variants§
Skip
Do not fire the workflow, continue polling on the next interval.
Fire(Option<Context<Value>>)
Fire the workflow with an optional context.
Implementations§
Source§impl TriggerResult
impl TriggerResult
Sourcepub fn should_fire(&self) -> bool
pub fn should_fire(&self) -> bool
Returns true if this result indicates the workflow should fire.
Sourcepub fn into_context(self) -> Option<Context<Value>>
pub fn into_context(self) -> Option<Context<Value>>
Extracts the context if this is a Fire result.
Sourcepub fn context_hash(&self) -> String
pub fn context_hash(&self) -> String
Computes a hash of the context for deduplication purposes.
If no context is provided, returns a constant hash. This allows deduplication based on the specific trigger conditions.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TriggerResult
impl RefUnwindSafe for TriggerResult
impl Send for TriggerResult
impl Sync for TriggerResult
impl Unpin for TriggerResult
impl UnsafeUnpin for TriggerResult
impl UnwindSafe for TriggerResult
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