Show / Hide Table of Contents

Interface IResultMonad<T, TError, TSelf>

Represents the common interface for Result monad.

Inherited Members
IResultMonad<T, TError>.OrInvoke(Func<TError, T>)
IResultMonad<T, TError>.Error
IOptionMonad<T>.Or(T)
IOptionMonad<T>.OrInvoke(Func<T>)
IOptionMonad<T>.TryGet(out T)
IOptionMonad<T>.HasValue
IOptionMonad<T>.ValueOrDefault
ISupplier<object>.Invoke()
IFunctional.DynamicInvoke(scoped ref readonly Variant, int, scoped Variant)
IFunctional.GetArgument<T>(ref readonly Variant, int)
Namespace: DotNext
Assembly: DotNext.dll
Syntax
public interface IResultMonad<T, TError, TSelf> : IResultMonad<T, TError>, IOptionMonad<T, TSelf>, IOptionMonad<T>, ISupplier<object?>, IFunctional where TError : notnull where TSelf : struct, IResultMonad<T, TError, TSelf>
Type Parameters
Name Description
T

The type of the result.

TError

The type that represents an error.

TSelf

The implementing type.

Methods

View Source

FromError(TError)

Creates unsuccessful result.

Declaration
public static abstract TSelf FromError(TError error)
Parameters
Type Name Description
TError error

The error representing unsuccessful result.

Returns
Type Description
TSelf

The unsuccessful result.

  • View Source
☀
☾
In this article
Back to top
Supported by the .NET Foundation
☀
☾