Show / Hide Table of Contents

Struct ValueBox

Allocation free container for a single value

Namespace: Wasmtime
Assembly: Wasmtime.Dotnet.dll
Syntax
public readonly struct ValueBox

Methods

| Improve this Doc View Source

As<T>()

"Unbox" a reference type.

Declaration
public readonly T As<T>()
    where T : class
Returns
Type Description
T
Type Parameters
Name Description
T
| Improve this Doc View Source

AsBox<T>(T)

"Box" an arbitrary reference type without any heap allocations

Declaration
public static ValueBox AsBox<T>(T value)
    where T : class
Parameters
Type Name Description
T value
Returns
Type Description
ValueBox
Type Parameters
Name Description
T
| Improve this Doc View Source

AsDouble()

"Unbox" a value.

Declaration
public readonly double AsDouble()
Returns
Type Description
System.Double
| Improve this Doc View Source

AsFunction(Store)

"Unbox" a Function value.

Declaration
public readonly Function AsFunction(Store store)
Parameters
Type Name Description
Store store
Returns
Type Description
Function
| Improve this Doc View Source

AsInt32()

"Unbox" an value.

Declaration
public readonly int AsInt32()
Returns
Type Description
System.Int32
| Improve this Doc View Source

AsInt64()

"Unbox" a value.

Declaration
public readonly long AsInt64()
Returns
Type Description
System.Int64
| Improve this Doc View Source

AsSingle()

"Unbox" a value.

Declaration
public readonly float AsSingle()
Returns
Type Description
System.Single
| Improve this Doc View Source

AsV128()

"Unbox" a V128 value.

Declaration
public readonly V128 AsV128()
Returns
Type Description
V128

Operators

| Improve this Doc View Source

Explicit(ReadOnlySpan<Byte> to ValueBox)

"Box" a 16 element byte span without any heap allocations

Declaration
public static explicit operator ValueBox(ReadOnlySpan<byte> value)
Parameters
Type Name Description
ReadOnlySpan<System.Byte> value
Returns
Type Description
ValueBox
| Improve this Doc View Source

Explicit(Byte[] to ValueBox)

"Box" a 16 element byte array without any heap allocations

Declaration
public static explicit operator ValueBox(byte[] value)
Parameters
Type Name Description
System.Byte[] value
Returns
Type Description
ValueBox
| Improve this Doc View Source

Implicit(Double to ValueBox)

"Box" a double without any heap allocations

Declaration
public static implicit operator ValueBox(double value)
Parameters
Type Name Description
System.Double value
Returns
Type Description
ValueBox
| Improve this Doc View Source

Implicit(Int32 to ValueBox)

"Box" an int without any heap allocations

Declaration
public static implicit operator ValueBox(int value)
Parameters
Type Name Description
System.Int32 value
Returns
Type Description
ValueBox
| Improve this Doc View Source

Implicit(Int64 to ValueBox)

"Box" a long without any heap allocations

Declaration
public static implicit operator ValueBox(long value)
Parameters
Type Name Description
System.Int64 value
Returns
Type Description
ValueBox
| Improve this Doc View Source

Implicit(Single to ValueBox)

"Box" a float without any heap allocations

Declaration
public static implicit operator ValueBox(float value)
Parameters
Type Name Description
System.Single value
Returns
Type Description
ValueBox
| Improve this Doc View Source

Implicit(String to ValueBox)

"Box" a string without any heap allocations

Declaration
public static implicit operator ValueBox(string value)
Parameters
Type Name Description
System.String value
Returns
Type Description
ValueBox
| Improve this Doc View Source

Implicit(Function to ValueBox)

"Box" a function without any heap allocations

Declaration
public static implicit operator ValueBox(Function value)
Parameters
Type Name Description
Function value
Returns
Type Description
ValueBox
| Improve this Doc View Source

Implicit(V128 to ValueBox)

"Box" a 16 element vector of bytes without any heap allocations

Declaration
public static implicit operator ValueBox(V128 value)
Parameters
Type Name Description
V128 value
Returns
Type Description
ValueBox
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX