ResultLogicalCombinators

This trait provides logical combinators for Booleans and Results: and, or, not

Note that a Result expression can throw an exception which will be changed into a failure or an error before being used with and/or/not

The implicit definitions can not be easily replaced with extension methods otherwise this brings too many conflicts with the synthetized method names, like extension_and for both the extension for a Boolean value and a Result

Companion:
object
trait Results
class Object
trait Matchable
class Any

Type members

Classlikes

Inherited classlikes

object given_Conversion_Boolean_Result extends Conversion[Boolean, Result]

implicit definition to accept any boolean value as a Result This avoids writing b must beTrue

implicit definition to accept any boolean value as a Result This avoids writing b must beTrue

Inherited from:
Results

Value members

Inherited methods

Inherited from:
Results
def negateWhen(condition: Boolean)(r: Result): Result
Inherited from:
Results
def toResult(b: Boolean): Result
Inherited from:
Results

Givens

Inherited givens

implicit definition to accept any boolean value as a Result This avoids writing b must beTrue

implicit definition to accept any boolean value as a Result This avoids writing b must beTrue

Inherited from:
Results

Implicits

Implicits

implicit def combineBoolean(b: => Boolean): ResultLogicalCombinator