MatchResultOps

com.phasmidsoftware.matchers.Matchers.MatchResultOps
implicit class MatchResultOps[R](rr: Matchers.this.MatchResult[R])

Implicit class MatchResultOps, which allows us to use the method tee on a MatchResult[R].

Type parameters

R

the result type of m.

Value parameters

rr

a MatchResult[R].

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def :-(f: R => Unit): Matchers.this.MatchResult[R]

This method can be pronounced as "tee" as it's like a tee in a pipe. The input and the output are identical (so it's like identity) but it has a side-effect: the function f is invoked on the matched value of r (assuming that it is a Match, otherwise f is not invoked).

This method can be pronounced as "tee" as it's like a tee in a pipe. The input and the output are identical (so it's like identity) but it has a side-effect: the function f is invoked on the matched value of r (assuming that it is a Match, otherwise f is not invoked).

Value parameters

f

a R => Unit function.

Attributes

Returns

rr unchanged.

def ::-(f: R => Unit, g: String => Unit): Matchers.this.MatchResult[R]

This method can also be pronounced as "tee" as it's like a tee in a pipe. The input and the output are identical (so it's like identity) but it has a side-effect: the function f is invoked on the matched value of r, while, otherwise, the function g is invoked on the String representation of the MatchResult (a Miss or Error).

This method can also be pronounced as "tee" as it's like a tee in a pipe. The input and the output are identical (so it's like identity) but it has a side-effect: the function f is invoked on the matched value of r, while, otherwise, the function g is invoked on the String representation of the MatchResult (a Miss or Error).

Value parameters

f

a R => Unit function.

Attributes

Returns

rr unchanged.