AsyncIterator

cps.stream.AsyncIterator
See theAsyncIterator companion object
trait AsyncIterator[F[_], T]

Minimal mutable async stream.

Attributes

Companion
object
Source
AsyncIterator.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class AsyncListIterator[F, T]
Self type

Members list

Value members

Abstract methods

def next: F[Option[T]]

return the next element of stream in option or None if stream is finished.

return the next element of stream in option or None if stream is finished.

Attributes

Source
AsyncIterator.scala

Concrete methods

def filter(p: T => Boolean): AsyncIterator[F, T]

filter accumulator by p, returning only those values, which as satisficy p.

filter accumulator by p, returning only those values, which as satisficy p.

Attributes

Source
AsyncIterator.scala
def filterAsync(p: T => F[Boolean]): AsyncIterator[F, T]

filter accumulator by p, returning only those values, which as satisficy p. Note, that p is applied sequentially

filter accumulator by p, returning only those values, which as satisficy p. Note, that p is applied sequentially

Attributes

Source
AsyncIterator.scala
def find(p: T => Boolean): F[Option[T]]

Find first value wich satisficy p

Find first value wich satisficy p

Attributes

Source
AsyncIterator.scala
def findAsync(p: T => F[Boolean]): F[Option[T]]

Attributes

Source
AsyncIterator.scala
def flatMap[S](f: T => AsyncIterator[F, S]): AsyncIterator[F, S]

Attributes

Source
AsyncIterator.scala
def flatMapAsync[S](f: T => F[AsyncIterator[F, S]]): AsyncIterator[F, S]

Attributes

Source
AsyncIterator.scala
def flatMapTry[S](f: Try[T] => AsyncIterator[F, S]): AsyncIterator[F, S]

Attributes

Source
AsyncIterator.scala
def flatMapTryAsync[S](f: Try[T] => F[AsyncIterator[F, S]]): AsyncIterator[F, S]

Attributes

Source
AsyncIterator.scala
def fold[S](s0: S)(f: (S, T) => S): F[S]

Attributes

Source
AsyncIterator.scala
def foldAsync[S](s0: S)(f: (S, T) => F[S]): F[S]

Attributes

Source
AsyncIterator.scala
def inTry: AsyncIterator[F, Try[T]]

synonym for mapTry(identity)

synonym for mapTry(identity)

Attributes

Source
AsyncIterator.scala
def map[S](f: T => S): AsyncIterator[F, S]

return iterator with values mapped by f

return iterator with values mapped by f

Attributes

Source
AsyncIterator.scala
def mapAsync[S](f: T => F[S]): AsyncIterator[F, S]

map over async function. Substituted automatically when using await inside async block in map.

map over async function. Substituted automatically when using await inside async block in map.

Attributes

Source
AsyncIterator.scala
def mapTry[S](f: Try[T] => S): AsyncIterator[F, S]

map over Try[T], which allows to handle the cases, when next returns a failure. Be carefuel for situation, when failed next have no effect - in this case we will receive the infinite sequence of failuers.

map over Try[T], which allows to handle the cases, when next returns a failure. Be carefuel for situation, when failed next have no effect - in this case we will receive the infinite sequence of failuers.

Attributes

Source
AsyncIterator.scala
def mapTryAsync[S](f: Try[T] => F[S]): AsyncIterator[F, S]

async version of mapTry

async version of mapTry

Attributes

Source
AsyncIterator.scala
def scan[S](s0: S)(f: (S, T) => S): AsyncIterator[F, S]

Scan the value and output in the resulting iterator cummulative accumulated values. Note, that

Scan the value and output in the resulting iterator cummulative accumulated values. Note, that

  • f should be side effects free, since it can be reapplied in situation, when parallel threads tryng to read the next value
  • s0 and f(s,t) should not be nulls.

Attributes

Source
AsyncIterator.scala
def scanAsync[S](s0: S)(f: (S, T) => F[S]): AsyncIterator[F, S]

Scan the value and output in the resulting iterator cummulative accumulated values. Note, that

Scan the value and output in the resulting iterator cummulative accumulated values. Note, that

  • f should be side effects free, since it can be reapplied in situation, when parallel threads tryng to read the next value
  • s0 and f(s,t) should not be nulls.

Attributes

Source
AsyncIterator.scala
def take[CC[_]](n: Int)(using Factory[T, CC[T]]): F[CC[T]]

Attributes

Source
AsyncIterator.scala
def takeAll[CC[_]](n: Int)(using Factory[T, CC[T]]): F[CC[T]]

Attributes

Source
AsyncIterator.scala
def takeList(n: Int): F[List[T]]

Attributes

Source
AsyncIterator.scala
def takeTo[B <: Growable[T]](buffer: B, n: Int): F[B]

Attributes

Source
AsyncIterator.scala
def takeVector(n: Int): F[Vector[T]]

Attributes

Source
AsyncIterator.scala