wasmtime_component_resource_any_to_host function
- @Native<Pointer<
wasmtime_error_t> Function(Pointer<wasmtime_context_t> ctx, Pointer<wasmtime_component_resource_any_t> resource, Pointer<Pointer< ret)>(ffi.Pointer<wasmtime_context_t>, ffi.Pointer<wasmtime_component_resource_any_t>, ffi.Pointer<ffi.Pointer<wasmtime_component_resource_host_t>>)>()wasmtime_component_resource_host_t> >
- Pointer<
wasmtime_context_t> ctx, - Pointer<
wasmtime_component_resource_any_t> resource, - Pointer<
Pointer< retwasmtime_component_resource_host_t> >
\brief Attempts to convert a wasmtime_component_resource_any_t into a
wasmtime_component_resource_host_t.
This function will attempt to convert the provided resource into a
host-defined resource. If the resource is indeed host-defined then a new
owned wasmtime_component_resource_host_t is returned via ret. If the
resource is guest-defined then an error is returned and ret is not
modified.
If no error is returned then the pointer written to ret must be
deallocated with wasmtime_component_resource_host_delete.
Implementation
@ffi.Native<
ffi.Pointer<wasmtime_error_t> Function(
ffi.Pointer<wasmtime_context_t>,
ffi.Pointer<wasmtime_component_resource_any_t>,
ffi.Pointer<ffi.Pointer<wasmtime_component_resource_host_t>>,
)
>()
external ffi.Pointer<wasmtime_error_t> wasmtime_component_resource_any_to_host(
ffi.Pointer<wasmtime_context_t> ctx,
ffi.Pointer<wasmtime_component_resource_any_t> resource,
ffi.Pointer<ffi.Pointer<wasmtime_component_resource_host_t>> ret,
);