|
YACLib
C++ library for concurrent tasks execution
|
Default result trait, describes how async abstractions create and inspect results. More...
#include <result.hpp>
Public Types | |
| template<typename V > | |
| using | Result = yaclib::Result< V > |
| using | Error = std::exception_ptr |
| template<typename R > | |
| using | Value = typename detail::InstantiationType< yaclib::Result, R >::Value |
Static Public Member Functions | |
| template<typename V , typename... Args> | |
| static YACLIB_INLINE yaclib::Result< V > | MakeResult (Args &&... args) |
| template<typename V > | |
| static YACLIB_INLINE bool | Ok (const yaclib::Result< V > &r) noexcept |
| template<typename R > | |
| static YACLIB_INLINE decltype(auto) | GetValue (R &&r) noexcept |
| template<typename R > | |
| static YACLIB_INLINE decltype(auto) | GetError (R &&r) noexcept |
| template<typename R > | |
| static YACLIB_INLINE decltype(auto) | Get (R &&r) |
| static YACLIB_INLINE bool | IsStop (const std::exception_ptr &error) noexcept |
Default result trait, describes how async abstractions create and inspect results.
A custom trait should provide the same interface, its container should be copyable iff V is copyable. MakeResult<V>(StopTag) and MakeResult<V>(std::exception_ptr) must not throw: they are invoked inside noexcept cancellation and teardown paths, a throw there will std::terminate
Definition at line 218 of file result.hpp.
| using yaclib::ResultTrait::Error = std::exception_ptr |
Definition at line 222 of file result.hpp.
| using yaclib::ResultTrait::Result = yaclib::Result<V> |
Definition at line 220 of file result.hpp.
Definition at line 225 of file result.hpp.
|
inlinestatic |
Definition at line 259 of file result.hpp.
References yaclib::MakeContract().
|
inlinestaticnoexcept |
Definition at line 254 of file result.hpp.
References yaclib::MakeContract().
|
inlinestaticnoexcept |
Definition at line 249 of file result.hpp.
References yaclib::MakeContract().
|
inlinestaticnoexcept |
Definition at line 263 of file result.hpp.
References yaclib::IsStop().
|
inlinestatic |
Definition at line 228 of file result.hpp.
References yaclib::MakeContract().
|
inlinestaticnoexcept |
Definition at line 244 of file result.hpp.
References yaclib::MakeContract().