Show / Hide Table of Contents

Struct Result<T>.Failure

Represents unsuccessful result.

Implements
IResultMonad<T>
IResultMonad<T, Exception>
IOptionMonad<T>
ISupplier<object>
IFunctional
Inherited Members
ValueType.Equals(object)
ValueType.GetHashCode()
ValueType.ToString()
object.GetType()
object.Equals(object, object)
object.ReferenceEquals(object, object)
Namespace: DotNext
Assembly: DotNext.dll
Syntax
public readonly struct Result<T>.Failure : IResultMonad<T>, IResultMonad<T, Exception>, IOptionMonad<T>, ISupplier<object?>, IFunctional

Constructors

View Source

Failure(Exception)

Represents unsuccessful result.

Declaration
public Failure(Exception error)
Parameters
Type Name Description
Exception error

The exception that represents the error.

Properties

View Source

Error

Gets the underlying exception.

Declaration
public Exception Error { get; }
Property Value
Type Description
Exception

Operators

View Source

implicit operator Result<T>(Failure)

Converts successful result to Result<T> type.

Declaration
public static implicit operator Result<T>(Result<T>.Failure result)
Parameters
Type Name Description
Result<T>.Failure result

The result to convert.

Returns
Type Description
Result<T>

An instance of Result<T> that represents the successful result.

View Source

implicit operator Failure(Exception)

Converts the exception to the monad.

Declaration
public static implicit operator Result<T>.Failure(Exception error)
Parameters
Type Name Description
Exception error

The value to convert.

Returns
Type Description
Result<T>.Failure

The monad that represents the failure.

Implements

IResultMonad<T>
IResultMonad<T, TError>
IOptionMonad<T>
ISupplier<TResult>
IFunctional

Extension Methods

BasicExtensions.IsBetween<T, TLowerBound, TUpperBound>(T, TLowerBound, TUpperBound)
BasicExtensions.IsOneOf<T>(T, params ReadOnlySpan<T>)
Enumerator.Skip<TEnumerator, T>(ref TEnumerator, int)
  • View Source
☀
☾
In this article
Back to top
Supported by the .NET Foundation
☀
☾