Result of a chart export operation — either a value or a ChartError.
<insightdock/error.h>
template<typename T>
struct ChartResult;
| Name | Description |
|---|---|
error | Error code; ChartError::None when ok. |
operator bool | Contextual bool conversion — true on success. |
| Name | Description |
|---|---|
failure | Construct a failed result with error e. |
success | Construct a successful result holding v. |
| Name | Description |
|---|---|
error_code | Error code (valid only when !ok). |
ok | True when the operation succeeded. |
value | Result value (valid only when ok). |
Contextually converts to bool (true = success), so existing code using if (!ChartExporter::save(...)) continues to work without changes.
| Name | Description |
|---|---|
| T | Value type on success. Use the void specialisation for operations that return no value (e.g. ChartExporter::save). |