Alternator

zio.blocks.endpoint.Alternator
See theAlternator companion object
trait Alternator[L, R]

Endpoint-local adapter for fallback output shapes.

The endpoint AST stores one abstraction that can be backed by either zio.blocks.combinators.Eithers on all Scala versions or zio.blocks.combinators.Unions on Scala 3. This keeps HttpCodec.Fallback and auth/error composition platform-agnostic while still delegating all combine / separate logic to the combinators block library.

Attributes

Companion
object
Source
Alternator.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Type members

Types

type Out

Attributes

Source
Alternator.scala

Value members

Abstract methods

def combine(either: Either[L, R]): Out

Attributes

Source
Alternator.scala
def separate(out: Out): Either[L, R]

Attributes

Source
Alternator.scala