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
GpuResult.h File Reference

Result type returned by fallible donner::gpu APIs. More...

#include <ostream>
#include <type_traits>
#include <variant>
#include "donner/base/Utils.h"
#include "donner/gpu/GpuError.h"
Include dependency graph for GpuResult.h:
This graph shows which files directly or indirectly include this file:

Classes

class  donner::gpu::Result< T >
 Result of a fallible GPU operation: exactly one of a value of type T or a GpuError. More...

Namespaces

namespace  donner
 Top-level Donner namespace, which is split into different sub-namespaces such as donner::svg and donner::css.

Typedefs

using donner::gpu::Status = Result<std::monostate>
 Status of a fallible GPU operation with no result value: either success (a std::monostate result) or a GpuError.

Functions

Status donner::gpu::OkStatus ()
 Returns a successful Status.
template<typename T>
void donner::gpu::PrintTo (const Result< T > &result, std::ostream *os)
 gtest PrintTo support for readable test failure messages.

Detailed Description

Result type returned by fallible donner::gpu APIs.

Typedef Documentation

◆ Status

using donner::gpu::Status = Result<std::monostate>

Status of a fallible GPU operation with no result value: either success (a std::monostate result) or a GpuError.

Construct success values with OkStatus().

Function Documentation

◆ PrintTo()

template<typename T>
void donner::gpu::PrintTo ( const Result< T > & result,
std::ostream * os )

gtest PrintTo support for readable test failure messages.

Parameters
resultResult to print.
osOutput stream.