Wasmtime
wasmtime::Tag Class Reference

A WebAssembly tag. More...

#include <tag.hh>

Public Member Functions

 Tag (wasmtime_tag_t tag)
 Creates a tag from the raw underlying C API representation.
 
TagType type (Store::Context cx) const
 Returns the type of this tag.
 
bool eq (Store::Context cx, const Tag &other) const
 Tests whether two tags are identical.
 
const wasmtime_tag_tcapi () const
 Returns the raw underlying C API tag this is using.
 

Static Public Member Functions

static Result< Tagcreate (Store::Context cx, const TagType &ty)
 Create a new host-defined tag. More...
 

Friends

class Instance
 

Detailed Description

A WebAssembly tag.

Tags are used to identify exception types. A tag describes the payload signature of exceptions created with it.

Note that this type does not itself own any resources. It points to resources owned within a Store and the Store must be passed in as the first argument to the functions defined on Tag. Note that if the wrong Store is passed in then the process will be aborted.

Member Function Documentation

◆ create()

static Result< Tag > wasmtime::Tag::create ( Store::Context  cx,
const TagType ty 
)
inlinestatic

Create a new host-defined tag.

Parameters
cxthe store in which to create the tag
tythe tag type describing the exception payload

The documentation for this class was generated from the following file: