Navigation
API > API/Plugins > API/Plugins/OnlineServicesInterface
A container that holds either a successful result or an erroneous result.
| Name | TResult |
| Type | class |
| Header File | /Engine/Plugins/Online/OnlineServices/Source/OnlineServicesInterface/Public/Online/OnlineResult.h |
| Include Path | #include "Online/OnlineResult.h" |
Syntax
template<typename SuccessType, typename ErrorType>
class TResult
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| Move construct a result | Online/OnlineResult.h | ||
| Copy construct a result of the same type | Online/OnlineResult.h | ||
TResult
(
ErrorType&& ErrValue |
Construct a result with an error value | Online/OnlineResult.h | |
TResult () |
Online/OnlineResult.h | ||
TResult
(
SuccessType&& OkValue |
Construct a result with an Ok value | Online/OnlineResult.h | |
TResult
(
const SuccessType& OkValue |
Construct a result with an Ok value | Online/OnlineResult.h | |
TResult
(
const ErrorType& ErrValue |
Construct a result with an error value | Online/OnlineResult.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~TResult() |
Online/OnlineResult.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Storage | TVariant< SuccessType, ErrorType > | Location that the result's value is stored | Online/OnlineResult.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
const ErrorType & GetErrorValue () |
Get the Error value stored in the result. | Online/OnlineResult.h | |
ErrorType & GetErrorValue () |
Get the Error value stored in the result. | Online/OnlineResult.h | |
const SuccessType & GetOkOrDefault
(
const SuccessType& DefaultValue |
Unwraps the result, returning the success value if one is held, otherwise returning the default passed. | Online/OnlineResult.h | |
const SuccessType & GetOkValue () |
Get the Ok value stored in the result. This must not be called on a result holding the error type | Online/OnlineResult.h | |
SuccessType & GetOkValue () |
Get the Ok value stored in the result. This must not be called on a result holding the error type | Online/OnlineResult.h | |
bool IsError () |
Check if the value held in the result is a ErrorType. | Online/OnlineResult.h | |
bool IsOk () |
Check if the value held in the result is a SuccessType. | Online/OnlineResult.h | |
const ErrorType * TryGetErrorValue () |
Convert from TResult |
Online/OnlineResult.h | |
ErrorType * TryGetErrorValue () |
Convert from TResult |
Online/OnlineResult.h | |
const SuccessType * TryGetOkValue () |
Convert from TResult |
Online/OnlineResult.h | |
SuccessType * TryGetOkValue () |
Convert from TResult |
Online/OnlineResult.h |