implicit class LeafSyntax[V] extends AnyRef
Syntax for lifting values into DescribedComputations
and creating leaf nodes in the log tree.
- Alphabetic
- By Inheritance
- LeafSyntax
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new LeafSyntax(value: V)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
logFailure(description: (V) ⇒ String): DescribedComputation[V]
Create a failure treelog.LogTreeSyntax.DescribedComputation using the given
description
function to generate a description for the tree node's label and for theDescribedComputations
value (i.e.Create a failure treelog.LogTreeSyntax.DescribedComputation using the given
description
function to generate a description for the tree node's label and for theDescribedComputations
value (i.e. the value will be\/-(description(value))
.import treelog.LogTreeSyntaxWithoutAnnotations._ import scalaz.syntax.show._ val leaf = 1 logFailure (x ⇒ s"One - $x") println(result.run.value) // Will print: -\/("One") - note that the 'left' means ''failure'', and the contained value is the description, not the 1. println(result.run.written.shows) // Will print: // Failed: One - 1
-
def
logFailure(description: String): DescribedComputation[V]
Create a failure treelog.LogTreeSyntax.DescribedComputation with
-\/(description)
as the value and a failure treelog.LogTreeSyntax.DescribedComputation with the givendescription
.Create a failure treelog.LogTreeSyntax.DescribedComputation with
-\/(description)
as the value and a failure treelog.LogTreeSyntax.DescribedComputation with the givendescription
.import treelog.LogTreeSyntaxWithoutAnnotations._ import scalaz.syntax.show._ val leaf = 1 ~>! "One" println(result.run.value) // Will print: -\/("One") - note that the 'left' means ''failure'', and the contained value is the description, not the 1. println(result.run.written.shows) // Will print: // Failed: One
-
def
logSuccess(description: (V) ⇒ String): DescribedComputation[V]
Create a success treelog.LogTreeSyntax.DescribedComputation with
\/-(value)
as the value and a success treelog.LogTreeSyntax.DescribedComputation using the givendescription
function to generate a description for the tree node's label.Create a success treelog.LogTreeSyntax.DescribedComputation with
\/-(value)
as the value and a success treelog.LogTreeSyntax.DescribedComputation using the givendescription
function to generate a description for the tree node's label.import treelog.LogTreeSyntaxWithoutAnnotations._ import scalaz.syntax.show._ val leaf = 1 logSuccess (x ⇒ s"One: $x") println(result.run.value) // Will print: \/-(1) - note that the 'right' means ''success'' println(result.run.written.shows) // Will print: // One: 1
-
def
logSuccess(description: String): DescribedComputation[V]
Create a success treelog.LogTreeSyntax.DescribedComputation with
\/-(value)
as the value and a success TreeNode with the givendescription
.Create a success treelog.LogTreeSyntax.DescribedComputation with
\/-(value)
as the value and a success TreeNode with the givendescription
.import treelog.LogTreeSyntaxWithoutAnnotations._ import scalaz.syntax.show._ val leaf = 1 logSuccess "One" println(result.run.value) // Will print: \/-(1) - note that the 'right' means ''success'' println(result.run.written.shows) // Will print: // One
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
~>(description: (V) ⇒ String): DescribedComputation[V]
Sugar for ⇒ String) logSuccess
-
def
~>(description: String): DescribedComputation[V]
Sugar for logSuccess
-
def
~>!(description: (V) ⇒ String): DescribedComputation[V]
Sugar for ⇒ String) logFailure
-
def
~>!(description: String): DescribedComputation[V]
Sugar for logFailure