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.
Loading...
Searching...
No Matches
donner::editor::Result< T, E > Struct Template Reference

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.
value {}
 Exported value. Valid only when isOk is true.
error {}
 Error message. Valid only when isOk is false.

Detailed Description

template<typename T, typename E>
struct donner::editor::Result< T, E >

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.


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