YOrch 1.0.0
Loading...
Searching...
No Matches
yorch::step_result Struct Reference

Represents the basic outcome of a task step. More...

#include <result.hpp>

Public Member Functions

constexpr bool ok () const noexcept
 Returns whether the status is success.
 
constexpr operator bool () const noexcept
 Allows the result to be tested as a success flag.
 

Static Public Member Functions

static constexpr step_result success () noexcept
 Creates a successful result.
 
static constexpr step_result failure () noexcept
 Creates a failed result.
 
static constexpr step_result retry () noexcept
 Creates a retry result.
 
static constexpr step_result abort_branch () noexcept
 Creates a result that aborts the current branch.
 
static constexpr step_result abort_execution () noexcept
 Creates a result that aborts the whole execution.
 

Public Attributes

step_status status = step_status::success
 

Detailed Description

Represents the basic outcome of a task step.

step_result describes whether the current step succeeded, was skipped, should be retried, or should stop later execution. It only models status; use task_result<T> when a step also needs to produce a value for downstream steps.

Definition at line 42 of file result.hpp.

Member Function Documentation

◆ abort_branch()

static constexpr step_result yorch::step_result::abort_branch ( )
inlinestaticconstexprnoexcept

Creates a result that aborts the current branch.

Definition at line 61 of file result.hpp.

◆ abort_execution()

static constexpr step_result yorch::step_result::abort_execution ( )
inlinestaticconstexprnoexcept

Creates a result that aborts the whole execution.

Definition at line 66 of file result.hpp.

◆ failure()

static constexpr step_result yorch::step_result::failure ( )
inlinestaticconstexprnoexcept

Creates a failed result.

Definition at line 51 of file result.hpp.

◆ ok()

constexpr bool yorch::step_result::ok ( ) const
inlineconstexprnoexcept

Returns whether the status is success.

Definition at line 71 of file result.hpp.

◆ operator bool()

constexpr yorch::step_result::operator bool ( ) const
inlineexplicitconstexprnoexcept

Allows the result to be tested as a success flag.

Definition at line 76 of file result.hpp.

◆ retry()

static constexpr step_result yorch::step_result::retry ( )
inlinestaticconstexprnoexcept

Creates a retry result.

Definition at line 56 of file result.hpp.

◆ success()

static constexpr step_result yorch::step_result::success ( )
inlinestaticconstexprnoexcept

Creates a successful result.

Definition at line 46 of file result.hpp.

Member Data Documentation

◆ status

step_status yorch::step_result::status = step_status::success

Definition at line 43 of file result.hpp.


The documentation for this struct was generated from the following file: