kadai

package kadai

Linear Supertypes
TraversableOptional, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. kadai
  2. TraversableOptional
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. case class Attempt[+A](run: \/[Invalid, A]) extends Product with Serializable

    Represents the result of an action, which may be the result itself or an Invalid (error).

    Represents the result of an action, which may be the result itself or an Invalid (error).

    An unsafe operation may be attempted using Attempt.safe(unsafeCall) for instance:

    val r: Attempt[String] = for {
      a <- Attempt.safe { throw new RuntimeException("oh noes!") }
      b <- Attempt.ok("should be ok!")
    } yield b

    will result in an Attempt that holds an Invalid.Err with the RuntimeException in it.

    This class does not – and will not – auto-magically catch exceptions for you in map/flatMap.

    Since

    1.2

  2. sealed trait Invalid extends AnyRef

    ADT representing something invalid, may be a simple message or an exception.

    ADT representing something invalid, may be a simple message or an exception.

    Contains syntax for converting a String or Throwable into an Invalid, eg:

    import Invalid.syntax
    
    val is: Invalid = "something went wrong".invalid
    val or: Invalid \/ Int = "oh noes!".invalidResult[Int]
    val nit: NonEmptyList[Invalid] = new IllegalStateException.invalidNel
  3. implicit class NotEmptySyntax[A, Repr] extends AnyRef

    Add syntax:

    Add syntax:

    coll.notEmpty: Option[CollType]
    Definition Classes
    TraversableOptional
  4. trait TraversableOptional extends AnyRef

    Add safe, total methods such as tailOption to anything Traversable

  5. class TraversableOptionalSyntax[A, Repr] extends AnyRef

    Add syntax:

    Add syntax:

    coll.tailOption: Option[CollType]
    coll.headTailOption: Option[(ElemType, CollType)]
    Definition Classes
    TraversableOptional

Value Members

  1. implicit def AddTraversableOptionalSyntax[Repr](rep: Repr)(implicit fr: IsTraversableLike[Repr]): TraversableOptionalSyntax[A, Repr]

    Definition Classes
    TraversableOptional
  2. object Attempt extends Serializable

  3. object Encoding

    Contains Base16 and Base32 (human-readable variant) encoding support, including as compile-time constants.

    Contains Base16 and Base32 (human-readable variant) encoding support, including as compile-time constants. eg:

    val a: BigInt = b16"ac60730edd01d21d3a367b638b5549c3b8fe2339"
    val b: BigInt = b32"G6VGHR3TTDMVIRZSMLQ2ABL4DZRS5WTX"

    These will not compile if they contain incorrect characters for the encoding.

  4. object Invalid

  5. object Throwables

Inherited from TraversableOptional

Inherited from AnyRef

Inherited from Any

Ungrouped