Result

A basic result object use by various parts of JCLI.

Constructors

this
this(ResultType value)

Members

Functions

asType
ResultType asType()
isType
bool isType()

Static functions

failure
Result!T failure(string error)

Constructs a failure result, returning the given error.

failureIf
Result!T failureIf(bool condition, T value, string error)

Constructs a failure result if the condition is true, otherwise constructs a success result with the given value.

failureIf
Result!T failureIf(bool condition, string error)
Undocumented in source. Be warned that the author may not have intended to support it.
success
Result!T success(T value)

Constructs a successful result, returning the given value.

success
Result!void success()
Undocumented in source. Be warned that the author may not have intended to support it.

Structs

Failure
struct Failure
Undocumented in source.
Success
struct Success
Undocumented in source.

Parameters

T

The type that is returned by this result object.

Meta