A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://dotnet.github.io/dotNext/api/DotNext.IResultMonad-3.html below:

Interface IResultMonad<T, TError, TSelf> | .NEXT

Interface IResultMonad<T, TError, TSelf>

Represents the common interface for Result monad.

Namespace: DotNext Assembly: DotNext.dll Syntax
public interface IResultMonad<T, TError, TSelf> : IResultMonad<T, TError>, IOptionMonad<T, TSelf>, IOptionMonad<T>, ISupplier<object?>, IFunctional<Func<object?>> 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 | Edit this page 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.

Operators | Edit this page View Source implicit operator Optional<T>(in TSelf)

Converts the result to Optional<T> monad.

Declaration
public static implicit operator Optional<T>(in TSelf result)
Parameters Type Name Description TSelf result

The result to be converted.

Returns Type Description Optional<T>

The converted result.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4