Show / Hide Table of Contents

Struct FunctionResult<T>

A result from a function call which may represent a Value or a Trap

Implements
IFunctionResult<FunctionResult<T>, T, Wasmtime.FunctionResultBuilder<T>>
Namespace: Wasmtime
Assembly: Wasmtime.Dotnet.dll
Syntax
public readonly struct FunctionResult<T> : IFunctionResult<FunctionResult<T>, T, FunctionResultBuilder<T>>
Type Parameters
Name Description
T

Type of the return value contained in this result

Properties

| Improve this Doc View Source

Trap

Get the trap associated with this result

Declaration
public readonly TrapException Trap { get; }
Property Value
Type Description
TrapException
| Improve this Doc View Source

Type

Indicates what type of result this contains

Declaration
public readonly ResultType Type { get; }
Property Value
Type Description
ResultType
| Improve this Doc View Source

Value

Get the value associated with this result

Declaration
public readonly T Value { get; }
Property Value
Type Description
T

Operators

| Improve this Doc View Source

Explicit(FunctionResult<T> to T)

Convert this result into a value, throw if it is a Trap

Declaration
public static explicit operator T(FunctionResult<T> value)
Parameters
Type Name Description
FunctionResult<T> value
Returns
Type Description
T
Exceptions
Type Condition
TrapException

Thrown if Type == Trap

Implements

IFunctionResult<TResult, TOk, TBuilder>
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX