WasmValueType Struct

A value type: a number type, the vector type, or a reference type with its heap type.

public readonly struct WasmValueType : IEquatable<WasmValueType>
Implements

Constructors

NameDescription
WasmValueType(WasmValueKind, WasmHeapKind, bool)A value type: a number type, the vector type, or a reference type with its heap type.

WasmValueType(WasmValueKind, WasmHeapKind, bool)

A value type: a number type, the vector type, or a reference type with its heap type.

public WasmValueType(WasmValueKind Kind, WasmHeapKind Heap = WasmHeapKind.Extern, bool Nullable = true)

Parameters

Kind WasmValueKind
The kind of the type.
Heap WasmHeapKind
The heap type of a reference type.
Nullable bool
Whether a reference type contains the null reference.

Properties

NameDescription
AnyRefGets the anyref type: (ref null any).
ExnRefGets the exnref type: (ref null exn).
ExternRefGets the externref type: (ref null extern).
F32Gets the f32 type.
F64Gets the f64 type.
FuncRefGets the funcref type: (ref null func).
HeapThe heap type of a reference type.
I32Gets the i32 type.
I64Gets the i64 type.
IsAnyReferenceGets a value indicating whether the type matches (ref null any).
IsExceptionReferenceGets a value indicating whether the type matches (ref null exn).
IsExternReferenceGets a value indicating whether the type matches (ref null extern).
IsFunctionReferenceGets a value indicating whether the type matches (ref null func).
IsReferenceGets a value indicating whether the type is a reference type.
KindThe kind of the type.
NullableWhether a reference type contains the null reference.
V128Gets the v128 type.

Gets the anyref type: (ref null any).

public static WasmValueType AnyRef { get; }

Property value

WasmValueType

Gets the exnref type: (ref null exn).

public static WasmValueType ExnRef { get; }

Property value

WasmValueType

ExternRef

WasmTypes.cs

Gets the externref type: (ref null extern).

public static WasmValueType ExternRef { get; }

Property value

WasmValueType

Gets the f32 type.

public static WasmValueType F32 { get; }

Property value

WasmValueType

Gets the f64 type.

public static WasmValueType F64 { get; }

Property value

WasmValueType

Gets the funcref type: (ref null func).

public static WasmValueType FuncRef { get; }

Property value

WasmValueType

The heap type of a reference type.

public WasmHeapKind Heap { get; init; }

Property value

WasmHeapKind

Gets the i32 type.

public static WasmValueType I32 { get; }

Property value

WasmValueType

Gets the i64 type.

public static WasmValueType I64 { get; }

Property value

WasmValueType

IsAnyReference

WasmTypes.cs

Gets a value indicating whether the type matches (ref null any).

public bool IsAnyReference { get; }

Property value

bool

IsExceptionReference

WasmTypes.cs

Gets a value indicating whether the type matches (ref null exn).

public bool IsExceptionReference { get; }

Property value

bool

IsExternReference

WasmTypes.cs

Gets a value indicating whether the type matches (ref null extern).

public bool IsExternReference { get; }

Property value

bool

IsFunctionReference

WasmTypes.cs

Gets a value indicating whether the type matches (ref null func).

public bool IsFunctionReference { get; }

Property value

bool

IsReference

WasmTypes.cs

Gets a value indicating whether the type is a reference type.

public bool IsReference { get; }

Property value

bool

The kind of the type.

public WasmValueKind Kind { get; init; }

Property value

WasmValueKind

Nullable

WasmTypes.cs

Whether a reference type contains the null reference.

public bool Nullable { get; init; }

Property value

bool

Gets the v128 type.

public static WasmValueType V128 { get; }

Property value

WasmValueType

Methods

NameDescription
Deconstruct(WasmValueKind, WasmHeapKind, bool)
Equals(WasmValueType)
Equals(object)
GetHashCode()
ToString()Returns the type in the text format (e.g. i32, funcref, (ref null any)).

Deconstruct(WasmValueKind, WasmHeapKind, bool)

public void Deconstruct(out WasmValueKind Kind, out WasmHeapKind Heap, out bool Nullable)

Parameters

Kind WasmValueKind
Heap WasmHeapKind
Nullable bool

No documentation is available.

Equals overloads

Equals(WasmValueType)

public bool Equals(WasmValueType other)
Parameters
other WasmValueType
Returns

bool

No documentation is available.

Equals(object)

public override bool Equals(object obj)
Parameters
obj object
Returns

bool

No documentation is available.

GetHashCode()

public override int GetHashCode()

Returns

int

No documentation is available.

ToString()

WasmTypes.cs

Returns the type in the text format (e.g. i32, funcref, (ref null any)).

public override string ToString()

Returns

string

Operators

NameDescription
operator ==(WasmValueType, WasmValueType)
operator !=(WasmValueType, WasmValueType)

operator ==(WasmValueType, WasmValueType)

public static bool operator ==(WasmValueType left, WasmValueType right)

Parameters

left WasmValueType
right WasmValueType

Returns

bool

No documentation is available.

operator !=(WasmValueType, WasmValueType)

public static bool operator !=(WasmValueType left, WasmValueType right)

Parameters

left WasmValueType
right WasmValueType

Returns

bool

No documentation is available.