← ZIO Query docs

CompletedRequestMap

zio.query.CompletedRequestMap
See theCompletedRequestMap companion class

Attributes

Companion
class
Source
CompletedRequestMap.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

trait UnsafeApi

Attributes

Source
CompletedRequestMap.scala
Supertypes
class Object
trait Matchable
class Any

Value members

Concrete methods

def apply[E, A](entries: (Request[E, A], Exit[E, A])*): CompletedRequestMap

Attributes

Source
CompletedRequestMap.scala

Combines all completed request maps into a single one.

Combines all completed request maps into a single one.

This method is left-associated, meaning that if a request is present in multiple maps, it will be overriden by the last map in the list.

Attributes

Source
CompletedRequestMap.scala
def die[E, A](requests: Chunk[Request[E, A]], error: Throwable): CompletedRequestMap

Constructs a completed requests map that "dies" all the specified requests with the specified throwable

Constructs a completed requests map that "dies" all the specified requests with the specified throwable

Attributes

Source
CompletedRequestMap.scala
def fail[E, A](requests: Chunk[Request[E, A]], error: E): CompletedRequestMap

Constructs a completed requests map that fails all the specified requests with the specified error

Constructs a completed requests map that fails all the specified requests with the specified error

Attributes

Source
CompletedRequestMap.scala
def failCause[E, A](requests: Chunk[Request[E, A]], cause: Cause[E]): CompletedRequestMap

Constructs a completed requests map that fails all the specified requests with the specified cause

Constructs a completed requests map that fails all the specified requests with the specified cause

Attributes

Source
CompletedRequestMap.scala
def fromIterable[E, A](iterable: Iterable[(Request[E, A], Exit[E, A])]): CompletedRequestMap

Constructs a completed requests map from the specified results.

Constructs a completed requests map from the specified results.

Attributes

Source
CompletedRequestMap.scala
def fromIterableOption[E, A](iterable: Iterable[(Request[E, A], Exit[E, Option[A]])]): CompletedRequestMap

Constructs a completed requests map from the specified optional results.

Constructs a completed requests map from the specified optional results.

Attributes

Source
CompletedRequestMap.scala
def fromIterableWith[E, A, B](iterable: Iterable[A])(f1: A => Request[E, B], f2: A => Exit[E, B]): CompletedRequestMap

Constructs a completed requests map an iterable of A and functions that map each A to a request and a result

Constructs a completed requests map an iterable of A and functions that map each A to a request and a result

Value parameters

f1

function that maps each element of A to a request

f2

function that maps each element of A to an Exit, e.g., Exit.succeed(_)

Attributes

Source
CompletedRequestMap.scala
def single[E, A](request: Request[E, A], exit: Exit[E, A]): CompletedRequestMap

Constructs a completed requests map containing a single entry

Constructs a completed requests map containing a single entry

Attributes

Source
CompletedRequestMap.scala

Concrete fields

Unsafe API for constructing completed request maps.

Unsafe API for constructing completed request maps.

Constructing a CompletedRequestMap via these methods can improve performance in some cases as they allow skipping the creation of intermediate Iterable[ Tuple2[_, _] ].

NOTE: These methods are marked as unsafe because they do not check that the requests and responses are of the same size. It is the responsibility of the caller to ensure that the provided requests maps elements 1-to-1 to the responses.

Attributes

Source
CompletedRequestMap.scala