Table of Contents

Error Method

Definition

Namespace
Tyne
Assembly
Tyne.Core.dll

Methods

| Edit this page View Source

Error<T, TE>(in TE)

Creates an Error Result<T, TE>.

Declaration
[Pure]
public static Result<T, TE> Error<T, TE>(in TE error)
Parameters
error
TE

The TE value to encapsulate.

Returns
Result<T, TE>

An Error(TE) Result<T, TE> which wraps error.

Type Parameters
T

The type of value the result encapsulates.

TE

The type of error the result encapsulates.

Exceptions
ArgumentNullException

When error is null.