Res

ammonite.util.Res$
See theRes companion class
object Res

Attributes

Companion:
class
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Res.type

Members list

Concise view

Type members

Classlikes

case class Exception(t: Throwable, msg: String) extends Failing

An unknown exception was thrown when the command was being run, whether from the command itself or within Ammonite's own machinery.

An unknown exception was thrown when the command was being run, whether from the command itself or within Ammonite's own machinery.

Contains an optional msg that will be printed together with the exception when it it shown to the user.

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Failing
class Res[Nothing]
class Object
trait Matchable
class Any
case class Exit(value: Any) extends Failing

The user wanted to exit the REPL

The user wanted to exit the REPL

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Failing
class Res[Nothing]
class Object
trait Matchable
class Any
sealed abstract class Failing extends Res[Nothing]

Failing results never call their callbacks, and just remain unchanged

Failing results never call their callbacks, and just remain unchanged

Attributes

Graph
Supertypes
class Res[Nothing]
class Object
trait Matchable
class Any
Known subtypes
class Exception
class Exit
class Failure
object Skip.type
case class Failure(msg: String) extends Failing

A known failure occurred, maybe caused by an exception (e.g. ThreadDeath) and maybe not (e.g. compile error)

A known failure occurred, maybe caused by an exception (e.g. ThreadDeath) and maybe not (e.g. compile error)

Attributes

msg

the message we want to display on screen due to this failure

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Failing
class Res[Nothing]
class Object
trait Matchable
class Any
case object Skip extends Failing

Nothing was entered

Nothing was entered

Attributes

Graph
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Failing
class Res[Nothing]
class Object
trait Matchable
class Any
Self type
Skip.type
case class Success[+T](s: T) extends Res[T]

Successes map and flatmap just like a simple Box[T]

Successes map and flatmap just like a simple Box[T]

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Res[T]
class Object
trait Matchable
class Any

Inherited types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Attributes

Inherited from:
Mirror

Value members

Concrete methods

def apply[T](o: Option[T], errMsg: => String): Res[T]
def apply[T](o: Either[String, T]): Res[T]
def apply[T](o: Try[T], errMsg: Throwable => String): Res[T]
def fold[M <: (Iterable), T, V](init: V, inputs: M[T])(f: (V, T) => Res[V]): Res[V]
def map[M <: (Iterable), T, V](inputs: M[T])(f: T => Res[V])(implicit cbf: Factory[V, M[V]]): Res[M[V]]

Maps a Res-returning function across a collection M[T], failing fast and bailing out if any individual element fails.

Maps a Res-returning function across a collection M[T], failing fast and bailing out if any individual element fails.

Attributes