RESTCLIENT.NET / API REFERENCE
Outcome.Result<TSuccess, TFailure>.Ok<TSuccess, TFailure>
All API types · Outcome · View source
public sealed record Ok<TSuccess, TFailure>(TSuccess Value) : Result<TSuccess, TFailure>
Represents a successful computation containing a value of type TSuccess. This is the "happy path" case where everything worked as expected. In functional programming, this represents the Right side of an Either type or the Some case of an Option type with additional context.
| Parameter | Type | Default | Description |
|---|---|---|---|
Value |
TSuccess |
Required | The successful result value. |
Members
.ctor
public Ok(TSuccess Value);
Represents a successful computation containing a value of type TSuccess. This is the "happy path" case where everything worked as expected. In functional programming, this represents the Right side of an Either type or the Some case of an Option type with additional context.
| Parameter | Type | Default | Description |
|---|---|---|---|
Value |
TSuccess |
Required | The successful result value. |
ToString
public override string ToString();
Returns a string representation of the successful result.
Returns: A string representation of the success.
Value
public TSuccess Value { get; init; }