EitherBuilder

The builder for the entire either construct. This is different from a single branch.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard

Add a branch builder to this either builder

Link copied to clipboard
inline fun <T> EitherBuilder<T>.addBranch(branchInit: EitherBranchBuilder<T>.() -> Unit)

Add a branch to this builder. The branch is first initialized through the branchInit argument.

Link copied to clipboard
open override fun build(): ExpectedEither<T>

Build this either expectation

Link copied to clipboard
infix inline fun <T> EitherBuilder<T>.or(branchInit: EitherBranchBuilder<T>.() -> Unit): EitherBuilder<T>

Adds a branch to the either construct. or can be used multiple times to get more than two branches, like so: