|
Common System 0.2.0
Common interfaces and patterns for system integration
|
#include <kcenon/common/patterns/result.h>#include <kcenon/common/concepts/core.h>#include <iostream>#include <string>#include <type_traits>
Go to the source code of this file.
Functions | |
| template<concepts::Resultable R> | |
| void | inspect_result (const R &result, const std::string &label) |
| template<typename T > | |
| T | safe_unwrap (const Result< T > &val, const T &fallback) |
| template<concepts::MonadicResult R> | |
| auto | transform_chain (R result) |
| template<typename T > | |
| void | process (const T &value) |
| int | main () |
| void inspect_result | ( | const R & | result, |
| const std::string & | label ) |
Definition at line 25 of file concepts_showcase_example.cpp.
Referenced by main().

| int main | ( | ) |
Definition at line 62 of file concepts_showcase_example.cpp.
References inspect_result(), kcenon::common::error_codes::INTERNAL_ERROR, kcenon::common::error_codes::INVALID_ARGUMENT, kcenon::common::make_error(), kcenon::common::ok(), process(), safe_unwrap(), and transform_chain().

| void process | ( | const T & | value | ) |
Definition at line 49 of file concepts_showcase_example.cpp.
Referenced by main().

| T safe_unwrap | ( | const Result< T > & | val, |
| const T & | fallback ) |
Definition at line 33 of file concepts_showcase_example.cpp.
References kcenon::common::Result< T >::unwrap_or().
Referenced by main().


| auto transform_chain | ( | R | result | ) |
Definition at line 40 of file concepts_showcase_example.cpp.
Referenced by main().
