|
Wasmtime
|
#include <val.hh>
Public Member Functions | |
| ResourceAny (wasmtime_component_resource_any_t *raw) | |
Takes ownership of raw and wraps it with this class. | |
| ResourceAny (const ResourceAny &other) | |
| Copies another resource into this one. | |
| ResourceAny & | operator= (const ResourceAny &other) |
| Copies another resource into this one. | |
| ResourceAny (ResourceAny &&other)=default | |
| Moves resources from another resource into this one. | |
| ResourceAny & | operator= (ResourceAny &&other)=default |
| Moves resources from another resource into this one. | |
| const wasmtime_component_resource_any_t * | capi () const |
| Returns the underlying C API pointer. | |
| wasmtime_component_resource_any_t * | capi () |
| Returns the underlying C API pointer. | |
| wasmtime_component_resource_any_t * | capi_release () |
| Gives up ownership of the underlying C pointer to the caller. | |
| bool | owned () const |
| Returns whether this resource is owned. | |
| ResourceType | type () const |
| Returns the type of this resource. | |
| Result< std::monostate > | drop (Store::Context cx) const |
| Drops this resource in the component-model sense, cleaning up borrow state and executing the wasm destructor, if any. | |
| Result< ResourceHost > | to_host (Store::Context cx) const |
| Attempts to convert this resource to a host-defined resource. | |
Static Public Member Functions | |
| static const ResourceAny * | from_capi (wasmtime_component_resource_any_t *const *capi) |
Class representing a component model resource value which is either a guest or host-defined resource.
|
inlinestatic |
Converts the raw C API representation to this class without taking ownership.