![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <ValueOrError.h>
Public Member Functions | |
| template<typename... ArgTypes> | |
| TValueOrError (TValueOrError_ValueProxy< ArgTypes... > &&Proxy) | |
| template<typename... ArgTypes> | |
| TValueOrError (TValueOrError_ErrorProxy< ArgTypes... > &&Proxy) | |
| UE_REWRITE bool | IsValid () const |
| UE_REWRITE bool | HasError () const |
| ErrorType & | GetError () &UE_LIFETIMEBOUND |
| UE_REWRITE const ErrorType & | GetError () const &UE_LIFETIMEBOUND |
| UE_REWRITE ErrorType && | GetError () &&UE_LIFETIMEBOUND |
| ErrorType * | TryGetError () UE_LIFETIMEBOUND |
| UE_REWRITE const ErrorType * | TryGetError () const UE_LIFETIMEBOUND |
| ErrorType | StealError () |
| UE_REWRITE bool | HasValue () const |
| ValueType & | GetValue () &UE_LIFETIMEBOUND |
| UE_REWRITE const ValueType & | GetValue () const &UE_LIFETIMEBOUND |
| UE_REWRITE ValueType && | GetValue () &&UE_LIFETIMEBOUND |
| UE_REWRITE ValueType * | TryGetValue () UE_LIFETIMEBOUND |
| UE_REWRITE const ValueType * | TryGetValue () const UE_LIFETIMEBOUND |
| ValueType | StealValue () |
Type used to return either a value or an error.
These must have a value or an error when newly constructed, but it is possible to have neither because of the functions to steal the value or error. This is critical for callers to consider since it means that HasValue() and HasError() must be checked independently; a return value of false from one does not imply that the other will return true.
The MakeValue and MakeError functions may be used to construct these conveniently.
|
inline |
Construct the value from a proxy from MakeValue.
|
inline |
Construct the error from a proxy from MakeError.
|
inline |
|
inline |
Access the error. Asserts if this does not have an error.
|
inline |
|
inline |
|
inline |
Access the value. Asserts if this does not have a value.
|
inline |
|
inline |
Whether the error is set. An error does imply no value. No error does not imply that a value is set.
|
inline |
Whether the value is set. A value does imply no error. No value does not imply that an error is set.
|
inline |
Check whether a value is set. Prefer HasValue and HasError to this. !IsValid() does not imply HasError().
|
inline |
Steal the error. Asserts if this does not have an error. This causes the error to be unset.
|
inline |
Steal the value. Asserts if this does not have a value. This causes the value to be unset.
|
inline |
|
inline |
Access the error if it is set.
|
inline |
|
inline |
Access the value if it is set.