Struct ValueBox
Allocation free container for a single value
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 Parameters
|
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 Parameters
|
Improve this Doc
View Source
AsDouble()
Declaration
public readonly double AsDouble()
Returns
Type |
Description |
System.Double |
|
|
Improve this Doc
View Source
AsFunction(Store)
Declaration
public readonly Function AsFunction(Store store)
Parameters
Type |
Name |
Description |
Store |
store |
|
Returns
|
Improve this Doc
View Source
AsInt32()
Declaration
public readonly int AsInt32()
Returns
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
AsInt64()
Declaration
public readonly long AsInt64()
Returns
Type |
Description |
System.Int64 |
|
|
Improve this Doc
View Source
AsSingle()
Declaration
public readonly float AsSingle()
Returns
Type |
Description |
System.Single |
|
|
Improve this Doc
View Source
AsV128()
Declaration
public readonly V128 AsV128()
Returns
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
Returns
|
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