Struct Result<T>.Ok
Represents successful result.
Inherited Members
Namespace: DotNext
Assembly: DotNext.dll
Syntax
public readonly struct Result<T>.Ok : IResultMonad<T>, IResultMonad<T, Exception>, IOptionMonad<T>, ISupplier<object?>, IFunctional
Constructors
View SourceOk(T)
Represents successful result.
Declaration
public Ok(T value)
Parameters
| Type | Name | Description |
|---|---|---|
| T | value | The result value. |
Properties
View SourceValue
Gets the underlying value.
Declaration
public T Value { get; }
Property Value
| Type | Description |
|---|---|
| T |
Operators
View Sourceimplicit operator Result<T>(Ok)
Converts successful result to Result<T> type.
Declaration
public static implicit operator Result<T>(Result<T>.Ok result)
Parameters
| Type | Name | Description |
|---|---|---|
| Result<T>.Ok | result | The result to convert. |
Returns
| Type | Description |
|---|---|
| Result<T> | An instance of Result<T> that represents the successful result. |
implicit operator Ok(T)
Converts the value to the monad.
Declaration
public static implicit operator Result<T>.Ok(T value)
Parameters
| Type | Name | Description |
|---|---|---|
| T | value | The value to convert. |
Returns
| Type | Description |
|---|---|
| Result<T>.Ok | The monad that represents the successful result. |