Output

besom.aliases.Output
object Output extends OutputFactory

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Output.type

Members list

Value members

Inherited methods

def apply[A](value: A)(using Context): Output[A]

Creates an Output with the given value

Creates an Output with the given value

Attributes

See also

secret for creating an Output with a secret value

Inherited from:
OutputFactory
def eval[F[_] : ToFuture, A](value: F[A])(implicit evidence$3: ToFuture[F], Context): Output[A]

Creates an Output that evaluates given effectful computation.

Creates an Output that evaluates given effectful computation.

The type F[_] is constrained to types for which an instance of Result.ToFuture is defined.

Besom offers the following instances:

  • besom-core provides a ToFuture instance for scala.concurrent.Future
  • besom-zio provides a ToFuture instance for zio.Task
  • besom-cats provides a ToFuture instance for cats.effect.IO

Type parameters

A

the type of the value

F

the effect type

Value parameters

value

the value to wrap in an Output

Attributes

Inherited from:
OutputFactory
def fail(t: Throwable)(using Context): Output[Nothing]

Creates a failed Output containing given Throwable

Creates a failed Output containing given Throwable

Attributes

Inherited from:
OutputFactory
def secret[A](value: A)(using Context): Output[A]

Creates an Output that is known to be a secret

Creates an Output that is known to be a secret

Attributes

Inherited from:
OutputFactory
def sequence[A, CC <: (Iterable), To](coll: CC[Output[A]])(using BuildFrom[CC[Output[A]], A, To], Context): Output[To]

Creates an Output of a collection from a collection of Outputs.

Creates an Output of a collection from a collection of Outputs.

Attributes

See also

parSequence for parallel execution

Inherited from:
OutputFactory
def traverse[A, CC <: (Iterable), B, To](coll: CC[A])(f: A => Output[B])(using BuildFrom[CC[Output[B]], B, To], Context): Output[To]

Creates an Output of a collection from a collection of values mapped with the function f

Creates an Output of a collection from a collection of values mapped with the function f

Value parameters

coll

the collection to map with f

f

the Output-returning function to apply to each element in the collection

Attributes

Inherited from:
OutputFactory
def unit(using Context): Output[Unit]

Creates an Output that contains Unit

Creates an Output that contains Unit

Attributes

Inherited from:
OutputFactory
def when[A](condition: => Input[Boolean])(a: => Optional[A])(using ctx: Context): Output[Option[A]]

Creates an Output with the given a if the given condition is true or returns None if the condition is false

Creates an Output with the given a if the given condition is true or returns None if the condition is false

Attributes

Inherited from:
OutputFactory