StreamPlatformSpecific

zio.blocks.streams.StreamPlatformSpecific
trait StreamPlatformSpecific[+E, +A]

Attributes

Source
StreamPlatformSpecific.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Stream[E, A]
Self type
Stream[E, A]

Members list

Value members

Concrete methods

def count: Either[E, Long]

Returns the number of emitted elements, or the stream's typed error.

Returns the number of emitted elements, or the stream's typed error.

Attributes

Source
StreamPlatformSpecific.scala
def exists(pred: A => Boolean): Either[E, Boolean]

Tests whether any element satisfies pred, or returns the stream's typed error.

Tests whether any element satisfies pred, or returns the stream's typed error.

Attributes

Source
StreamPlatformSpecific.scala
def find(pred: A => Boolean): Either[E, Option[A]]

Returns the first element satisfying pred, or None if no element does.

Returns the first element satisfying pred, or None if no element does.

Attributes

Source
StreamPlatformSpecific.scala
def forall(pred: A => Boolean): Either[E, Boolean]

Tests whether every element satisfies pred, or returns the stream's typed error.

Tests whether every element satisfies pred, or returns the stream's typed error.

Attributes

Source
StreamPlatformSpecific.scala
def foreach(f: A => Unit): Either[E, Unit]

Alias for runForeach.

Alias for runForeach.

Attributes

Source
StreamPlatformSpecific.scala
def head: Either[E, Option[A]]

Returns the first element, or None if this stream is empty.

Returns the first element, or None if this stream is empty.

Attributes

Source
StreamPlatformSpecific.scala
def last: Either[E, Option[A]]

Returns the last element, or None if this stream is empty.

Returns the last element, or None if this stream is empty.

Attributes

Source
StreamPlatformSpecific.scala
def run[ES, E3, Z](sink: Sink[ES, A, Z])(implicit errorConcat: WithOut[E, ES, E3]): Either[E3, Z]

Runs this stream through sink, blocking until completion.

Runs this stream through sink, blocking until completion.

Attributes

Source
StreamPlatformSpecific.scala
def runCollect: Either[E, Chunk[A]]

Collects all emitted elements into a Chunk, blocking until completion.

Collects all emitted elements into a Chunk, blocking until completion.

Attributes

Source
StreamPlatformSpecific.scala
def runDrain: Either[E, Unit]

Consumes and discards all emitted elements, blocking until completion.

Consumes and discards all emitted elements, blocking until completion.

Attributes

Source
StreamPlatformSpecific.scala
def runFold(z: Double)(f: (Double, A) => Double): Either[E, Double]

Folds emitted elements from z with f, blocking until completion.

Folds emitted elements from z with f, blocking until completion.

Attributes

Source
StreamPlatformSpecific.scala
def runFold(z: Int)(f: (Int, A) => Int): Either[E, Int]

Folds emitted elements from z with f, blocking until completion.

Folds emitted elements from z with f, blocking until completion.

Attributes

Source
StreamPlatformSpecific.scala
def runFold(z: Long)(f: (Long, A) => Long): Either[E, Long]

Folds emitted elements from z with f, blocking until completion.

Folds emitted elements from z with f, blocking until completion.

Attributes

Source
StreamPlatformSpecific.scala
def runFold[Z](z: Z)(f: (Z, A) => Z)(implicit jtZ: Infer[Z]): Either[E, Z]

Folds emitted elements from z with f, blocking until completion.

Folds emitted elements from z with f, blocking until completion.

Attributes

Source
StreamPlatformSpecific.scala
def runForeach(f: A => Unit): Either[E, Unit]

Applies f to every emitted element, blocking until completion.

Applies f to every emitted element, blocking until completion.

Attributes

Source
StreamPlatformSpecific.scala
def start(implicit scope: Scope): scope.$[SyncReader[A]]

Materializes this stream as a scoped synchronous reader. Closing the scope closes the reader; asynchronous boundaries are bridged by the JVM runtime.

Materializes this stream as a scoped synchronous reader. Closing the scope closes the reader; asynchronous boundaries are bridged by the JVM runtime.

Attributes

Source
StreamPlatformSpecific.scala