#[non_exhaustive]pub struct TaskDef { /* private fields */ }Expand description
A task: one function call, with its outcome policies.
Implementations§
Source§impl TaskDef
impl TaskDef
Sourcepub fn header(&self) -> &NodeHeader
pub fn header(&self) -> &NodeHeader
The name, description and ext.
Sourcepub fn function(&self) -> &FunctionRef
pub fn function(&self) -> &FunctionRef
The function the task runs, and its raw input.
Sourcepub fn on_failure(&self) -> FailurePolicy
pub fn on_failure(&self) -> FailurePolicy
What a failure (a 5xx or an Err) does. Default fail.
Sourcepub fn on_rejection(&self) -> RejectionPolicy
pub fn on_rejection(&self) -> RejectionPolicy
What a rejection (a 4xx) does. Default continue.
Sourcepub fn terminal(&self) -> bool
pub fn terminal(&self) -> bool
Whether running the task ends the workflow, applied after the policies. Default false.
Sourcepub fn for_each(&self) -> Option<&ForEachDef>
pub fn for_each(&self) -> Option<&ForEachDef>
The task’s fan-out, if any: its function runs once per element.
Trait Implementations§
impl StructuralPartialEq for TaskDef
Auto Trait Implementations§
impl Freeze for TaskDef
impl RefUnwindSafe for TaskDef
impl Send for TaskDef
impl Sync for TaskDef
impl Unpin for TaskDef
impl UnsafeUnpin for TaskDef
impl UnwindSafe for TaskDef
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