|
Wasmtime
|
Class representing a component model result value.
More...
#include <val.hh>
Public Member Functions | |
| WitResult (Raw &&capi) | |
| WitResult (const WitResult &other) | |
Copy constructor to clone other. More... | |
| WitResult & | operator= (const WitResult &other) |
Copy assignment to clone from other. More... | |
| WitResult (WitResult &&other) | |
Move constructor to move the contents of other. More... | |
| WitResult & | operator= (WitResult &&other) |
Move assignment to move the contents of other. More... | |
| const Raw * | capi () const |
| Returns a pointer to the underlying C API representation. More... | |
| bool | is_ok () const |
Returns whether this result is the ok variant. | |
| const Val * | payload () const |
| Returns the optional payload value associated with this result. | |
Static Public Member Functions | |
| static const WitResult * | from_capi (const Raw *capi) |
| static WitResult * | from_capi (Raw *capi) |
| static const Raw * | to_capi (const WitResult *capi) |
| static Raw * | to_capi (WitResult *capi) |
| static WitResult | ok (std::optional< Val > val) |
Constructs a new result value with the ok variant. | |
| static WitResult | err (std::optional< Val > val) |
Constructs a new result value with the err variant. | |
Friends | |
| class | Val |
Class representing a component model result value.
|
inlineexplicit |
|
inline |
Copy constructor to clone other.
|
inline |
Move constructor to move the contents of other.
|
inline |
Returns a pointer to the underlying C API representation.
Copy assignment to clone from other.
Move assignment to move the contents of other.