|
|
Donner SVG Editor & Engine
SVG-native editor and embeddable SVG2 + CSS3 engine in C++20, with GPU (WebGPU) and compact CPU renderers, built for correctness, security, and performance.
|
Result of a fallible shader IR operation: exactly one of a value of type T or a ShaderError. More...
#include "donner/gpu/shader/ShaderResult.h"
Public Member Functions | |
| ShaderResult (T &&result) | |
| Construct from a successful result. | |
| ShaderResult (const T &result) | |
| Construct from a successful result by copy. | |
| ShaderResult (ShaderError &&error) | |
| Construct from an error. | |
| ShaderResult (const ShaderError &error) | |
| Construct from an error by copy. | |
| T & | result () & |
| Returns the contained result. | |
| T && | result () && |
| Returns the contained result (move). | |
| const T & | result () const & |
| Returns the contained result. | |
| ShaderError & | error () & |
| Returns the contained error. | |
| ShaderError && | error () && |
| Returns the contained error (move). | |
| const ShaderError & | error () const & |
| Returns the contained error. | |
| bool | hasResult () const noexcept |
| Returns true if this result contains a value. | |
| bool | hasError () const noexcept |
| Returns true if this result contains an error. | |
Result of a fallible shader IR operation: exactly one of a value of type T or a ShaderError.
Mirrors the accessor shape of donner::gpu::Result so call sites read the same across the GPU module, but carries the IR-local error type.
| T | Result type. |
|
inline |
Construct from a successful result.
| result | Result value. |
|
inline |
Construct from a successful result by copy.
| result | Result value. |
|
inline |
Construct from an error.
| error | Error value. |
|
inline |
Construct from an error by copy.
| error | Error value. |
|
inline |
Returns the contained error.
|
inline |
Returns the contained error (move).
|
inline |
Returns the contained error.
|
inline |
Returns the contained result.
|
inline |
Returns the contained result (move).
|
inline |
Returns the contained result.