cesium-native  0.41.0
CesiumUtility::Result< T > Struct Template Reference

Holds the result of an operation. If the operation succeeds, it will provide a value. It may also provide errors and warnings. More...

#include <CesiumUtility/Result.h>

Public Member Functions

 Result (T value_) noexcept
 
 Result (T value_, ErrorList errors_) noexcept
 
 Result (ErrorList errors_) noexcept
 

Public Attributes

std::optional< T > value
 The value, if the operation succeeded to the point where it can provide one. More...
 
ErrorList errors
 The errors and warnings that occurred during the operation. More...
 

Detailed Description

template<typename T>
struct CesiumUtility::Result< T >

Holds the result of an operation. If the operation succeeds, it will provide a value. It may also provide errors and warnings.

Template Parameters
TThe type of value included in the result.

Definition at line 16 of file Result.h.

Member Data Documentation

◆ errors

template<typename T >
ErrorList CesiumUtility::Result< T >::errors

The errors and warnings that occurred during the operation.

If a value is provided, there should not be any errors in this list, but there may be warnings. If a value is not provided, there should be at least one error in this list.

Definition at line 40 of file Result.h.

◆ value

template<typename T >
std::optional<T> CesiumUtility::Result< T >::value

The value, if the operation succeeded to the point where it can provide one.

If a value is not provided because the operation failed, then there should be at least one error in errors indicating what went wrong.

Definition at line 31 of file Result.h.


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