Poll

final case class Poll[+A](poll: RIO[Any, Option[Try[A]]]) extends AnyVal

Representation of a running asyncronous computation that can be polled.

Note that, unlike Futures, operations on an Poll don't require an execution context and might be applied sequentially every time poll is called. While this might be inneficient, this is by design, to simplify multiplatform development.

Companion:
object
trait Serializable
trait Product
trait Equals
class AnyVal
trait Matchable
class Any

Value members

Concrete methods

def as[B](x: B): Poll[B]

Changes the result of this operation to another value.

Changes the result of this operation to another value.

def flatMap[B](f: A => Poll[B]): Poll[B]

Combines two operations by applying a function to the result of the first operation.

Combines two operations by applying a function to the result of the first operation.

def map[B](f: A => B): Poll[B]

Maps the result of this operation.

Maps the result of this operation.

def transform[B](f: Try[A] => Try[B]): Poll[B]

Transforms the result of this operation.

Transforms the result of this operation.

def unit: Poll[Unit]

Changes the result of this operation unit.

Changes the result of this operation unit.

def zip[B](that: Poll[B]): Poll[(A, B)]

Combines two operations by combining their results into a tuple.

Combines two operations by combining their results into a tuple.

def zipWith[B, C](that: Poll[B])(f: (A, B) => C): Poll[C]

Combines two operations by combining their results with the given function.

Combines two operations by combining their results with the given function.

Inherited methods

def productElementNames: Iterator[String]
Inherited from:
Product
def productIterator: Iterator[Any]
Inherited from:
Product