|
|
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.
|
A success-or-error value used by the viewport SVG exporter. More...
#include "donner/editor/ViewportSvgExport.h"
Public Member Functions | |
| bool | ok () const |
| Whether this result holds a value. | |
Static Public Member Functions | |
| static Result | Ok (T value) |
| Construct a success result. | |
| static Result | Err (E error) |
| Construct an error result. | |
Public Attributes | |
| bool | isOk = false |
| True when value holds an exported result. | |
| T | value {} |
| Exported value. Valid only when isOk is true. | |
| E | error {} |
| Error message. Valid only when isOk is false. | |
A success-or-error value used by the viewport SVG exporter.
Either holds an exported value of type T, or a human-readable error string of type E. Donner's ParseResult is purpose-built for parser ParseErrors; the exporter wants a plain string error message, so this lightweight result type is used instead.