Packages

trait ZSink[-R, +E, +A0, -A, +B] extends AnyRef

A Sink[E, A0, A, B] consumes values of type A, ultimately producing either an error of type E, or a value of type B together with a remainder of type A0.

Sinks form monads and combine in the usual ways.

Self Type
ZSink[R, E, A0, A, B]
Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ZSink
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. abstract type State

Abstract Value Members

  1. abstract def extract(state: State): ZIO[R, E, B]
  2. abstract def initial: ZIO[R, E, Step[State, Nothing]]
  3. abstract def step(state: State, a: A): ZIO[R, E, Step[State, A0]]

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def ?: ZSink[R, Nothing, A0, A, Option[B]]

    Returns a new sink that tries to produce the B, but if there is an error in stepping or extraction, produces None.

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. final def chunked[A1 >: A0, A2 <: A]: ZSink[R, E, A1, Chunk[A2], B]

    Takes a Sink, and lifts it to be chunked in its input and output.

    Takes a Sink, and lifts it to be chunked in its input and output. This will not improve performance, but can be used to adapt non-chunked sinks wherever chunked sinks are required.

  7. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  8. final def const[C](c: ⇒ C): ZSink[R, E, A0, A, C]
  9. def contramap[C](f: (C) ⇒ A): ZSink[R, E, A0, C, B]
  10. final def contramapM[R1 <: R, E1 >: E, C](f: (C) ⇒ ZIO[R1, E1, A]): ZSink[R1, E1, A0, C, B]
  11. def dimap[C, D](f: (C) ⇒ A)(g: (B) ⇒ D): ZSink[R, E, A0, C, D]
  12. final def dropWhile[A1 <: A](pred: (A1) ⇒ Boolean): ZSink[R, E, A0, A1, B]
  13. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  15. def filter[A1 <: A](f: (A1) ⇒ Boolean): ZSink[R, E, A0, A1, B]

    Filters the inputs fed to this sink.

  16. final def filterM[R1 <: R, E1 >: E, A1 <: A](f: (A1) ⇒ IO[E1, Boolean]): ZSink[R1, E1, A0, A1, B]

    Effectfully filters the inputs fed to this sink.

  17. final def filterNot[A1 <: A](f: (A1) ⇒ Boolean): ZSink[R, E, A0, A1, B]
  18. final def filterNotM[E1 >: E, A1 <: A](f: (A1) ⇒ IO[E1, Boolean]): ZSink[R, E1, A0, A1, B]
  19. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  20. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  21. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  22. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  23. def map[C](f: (B) ⇒ C): ZSink[R, E, A0, A, C]

    Maps the value produced by this sink.

  24. def mapError[E1](f: (E) ⇒ E1): ZSink[R, E1, A0, A, B]
  25. final def mapM[R1 <: R, E1 >: E, C](f: (B) ⇒ ZIO[R1, E1, C]): ZSink[R1, E1, A0, A, C]

    Effectfully maps the value produced by this sink.

  26. def mapRemainder[A1](f: (A0) ⇒ A1): ZSink[R, E, A1, A, B]
  27. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  28. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  29. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  30. final def optional: ZSink[R, Nothing, A0, A, Option[B]]

    A named alias for ?.

  31. def provideSome[R1](f: (R1) ⇒ R): ZSink[R1, E, A0, A, B]
  32. final def race[R1 <: R, E1 >: E, A2 >: A0, A1 <: A, B1 >: B](that: ZSink[R1, E1, A2, A1, B1]): ZSink[R1, E1, A2, A1, B1]

    Runs both sinks in parallel on the input, returning the result from the one that finishes successfully first.

  33. final def raceBoth[R1 <: R, E1 >: E, A2 >: A0, A1 <: A, C](that: ZSink[R1, E1, A2, A1, C]): ZSink[R1, E1, A2, A1, Either[B, C]]

    Runs both sinks in parallel on the input, returning the result from the one that finishes successfully first.

  34. def stepChunk[A1 <: A](state: State, as: Chunk[A1]): ZIO[R, E, Step[State, A0]]
  35. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  36. final def takeWhile[A1 <: A](pred: (A1) ⇒ Boolean): ZSink[R, E, A0, A1, B]
  37. def toString(): String
    Definition Classes
    AnyRef → Any
  38. final def untilOutput(f: (B) ⇒ Boolean): ZSink[R, E, A0, A, B]
  39. final def update(state: Step[State, Nothing]): ZSink[R, E, A0, A, B]
  40. final def void: ZSink[R, E, A0, A, Unit]
  41. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  42. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  43. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  44. final def |[R1 <: R, E1 >: E, A2 >: A0, A1 <: A, B1 >: B](that: ZSink[R1, E1, A2, A1, B1]): ZSink[R1, E1, A2, A1, B1]

    A named alias for race.

Inherited from AnyRef

Inherited from Any

Ungrouped