Class/Object

zio.stream

ZSink

Related Docs: object ZSink | package stream

Permalink

final class ZSink[-R, +E, -In, +L, +Z] extends AnyVal

Self Type
ZSink[R, E, In, L, Z]
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ZSink
  2. AnyVal
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ZSink(channel: ZChannel[R, Nothing, Chunk[In], Any, E, Chunk[L], Z])

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    Any
  3. final def &>[R1 <: R, E1 >: E, A0, In1 <: In, L1 >: L <: In1, Z1](that: ⇒ ZSink[R1, E1, In1, L1, Z1])(implicit ev: <:<[L, In1], trace: ZTraceElement): ZSink[R1, E1, In1, L1, Z1]

    Permalink

    Operator alias for zipParRight.

  4. final def *>[R1 <: R, E1 >: E, A0, In1 <: In, L1 >: L <: In1, Z1](that: ⇒ ZSink[R1, E1, In1, L1, Z1])(implicit ev: <:<[L, In1], trace: ZTraceElement): ZSink[R1, E1, In1, L1, Z1]

    Permalink

    Operator alias for zipRight.

  5. final def <&[R1 <: R, E1 >: E, A0, In1 <: In, L1 >: L <: In1, Z1](that: ⇒ ZSink[R1, E1, In1, L1, Z1])(implicit ev: <:<[L, In1], trace: ZTraceElement): ZSink[R1, E1, In1, L1, Z]

    Permalink

    Operator alias for zipParLeft.

  6. final def <&>[R1 <: R, E1 >: E, A0, In1 <: In, L1 >: L <: In1, Z1](that: ⇒ ZSink[R1, E1, In1, L1, Z1])(implicit zippable: Zippable[Z, Z1], trace: ZTraceElement): ZSink[R1, E1, In1, L1, Out]

    Permalink

    Operator alias for zipPar.

  7. final def <*[R1 <: R, E1 >: E, A0, In1 <: In, L1 >: L <: In1, Z1](that: ⇒ ZSink[R1, E1, In1, L1, Z1])(implicit ev: <:<[L, In1], trace: ZTraceElement): ZSink[R1, E1, In1, L1, Z]

    Permalink

    Operator alias for zipLeft.

  8. final def <*>[R1 <: R, E1 >: E, A0, In1 <: In, L1 >: L <: In1, Z1](that: ⇒ ZSink[R1, E1, In1, L1, Z1])(implicit zippable: Zippable[Z, Z1], ev: <:<[L, In1], trace: ZTraceElement): ZSink[R1, E1, In1, L1, Out]

    Permalink

    Operator alias for zip.

  9. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    Any
  10. def as[Z2](z: ⇒ Z2)(implicit trace: ZTraceElement): ZSink[R, E, In, L, Z2]

    Permalink

    Replaces this sink's result with the provided value.

  11. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  12. val channel: ZChannel[R, Nothing, Chunk[In], Any, E, Chunk[L], Z]

    Permalink
  13. def collectAllWhileWith[S](z: ⇒ S)(p: (Z) ⇒ Boolean)(f: (S, Z) ⇒ S)(implicit ev: <:<[L, In], trace: ZTraceElement): ZSink[R, E, In, L, S]

    Permalink

    Repeatedly runs the sink for as long as its results satisfy the predicate p.

    Repeatedly runs the sink for as long as its results satisfy the predicate p. The sink's results will be accumulated using the stepping function f.

  14. def contramap[In1](f: (In1) ⇒ In)(implicit trace: ZTraceElement): ZSink[R, E, In1, L, Z]

    Permalink

    Transforms this sink's input elements.

  15. def contramapChunks[In1](f: (Chunk[In1]) ⇒ Chunk[In])(implicit trace: ZTraceElement): ZSink[R, E, In1, L, Z]

    Permalink

    Transforms this sink's input chunks.

    Transforms this sink's input chunks. f must preserve chunking-invariance

  16. def contramapChunksZIO[R1 <: R, E1 >: E, In1](f: (Chunk[In1]) ⇒ ZIO[R1, E1, Chunk[In]])(implicit trace: ZTraceElement): ZSink[R1, E1, In1, L, Z]

    Permalink

    Effectfully transforms this sink's input chunks.

    Effectfully transforms this sink's input chunks. f must preserve chunking-invariance

  17. def contramapZIO[R1 <: R, E1 >: E, In1](f: (In1) ⇒ ZIO[R1, E1, In])(implicit trace: ZTraceElement): ZSink[R1, E1, In1, L, Z]

    Permalink

    Effectfully transforms this sink's input elements.

  18. def dimap[In1, Z1](f: (In1) ⇒ In, g: (Z) ⇒ Z1)(implicit trace: ZTraceElement): ZSink[R, E, In1, L, Z1]

    Permalink

    Transforms both inputs and result of this sink using the provided functions.

  19. def dimapChunks[In1, Z1](f: (Chunk[In1]) ⇒ Chunk[In], g: (Z) ⇒ Z1)(implicit trace: ZTraceElement): ZSink[R, E, In1, L, Z1]

    Permalink

    Transforms both input chunks and result of this sink using the provided functions.

  20. def dimapChunksZIO[R1 <: R, E1 >: E, In1, Z1](f: (Chunk[In1]) ⇒ ZIO[R1, E1, Chunk[In]], g: (Z) ⇒ ZIO[R1, E1, Z1])(implicit trace: ZTraceElement): ZSink[R1, E1, In1, L, Z1]

    Permalink

    Effectfully transforms both input chunks and result of this sink using the provided functions.

    Effectfully transforms both input chunks and result of this sink using the provided functions. f and g must preserve chunking-invariance

  21. def dimapZIO[R1 <: R, E1 >: E, In1, Z1](f: (In1) ⇒ ZIO[R1, E1, In], g: (Z) ⇒ ZIO[R1, E1, Z1])(implicit trace: ZTraceElement): ZSink[R1, E1, In1, L, Z1]

    Permalink

    Effectfully transforms both inputs and result of this sink using the provided functions.

  22. def dropLeftover(implicit trace: ZTraceElement): ZSink[R, E, In, Nothing, Z]

    Permalink
  23. def exposeLeftover(implicit trace: ZTraceElement): ZSink[R, E, In, Nothing, (Z, Chunk[L])]

    Permalink
  24. def filterInput[In1 <: In](p: (In1) ⇒ Boolean)(implicit trace: ZTraceElement): ZSink[R, E, In1, L, Z]

    Permalink
  25. def filterInputZIO[R1 <: R, E1 >: E, In1 <: In](p: (In1) ⇒ ZIO[R1, E1, Boolean])(implicit trace: ZTraceElement): ZSink[R1, E1, In1, L, Z]

    Permalink
  26. def flatMap[R1 <: R, E1 >: E, In1 <: In, L1 >: L <: In1, Z1](f: (Z) ⇒ ZSink[R1, E1, In1, L1, Z1])(implicit ev: <:<[L, In1], trace: ZTraceElement): ZSink[R1, E1, In1, L1, Z1]

    Permalink

    Runs this sink until it yields a result, then uses that result to create another sink from the provided function which will continue to run until it yields a result.

    Runs this sink until it yields a result, then uses that result to create another sink from the provided function which will continue to run until it yields a result.

    This function essentially runs sinks in sequence.

  27. def foldSink[R1 <: R, E2, In1 <: In, L1 >: L <: In1, Z1](failure: (E) ⇒ ZSink[R1, E2, In1, L1, Z1], success: (Z) ⇒ ZSink[R1, E2, In1, L1, Z1])(implicit ev: <:<[L, In1], trace: ZTraceElement): ZSink[R1, E2, In1, L1, Z1]

    Permalink
  28. def getClass(): Class[_ <: AnyVal]

    Permalink
    Definition Classes
    AnyVal → Any
  29. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  30. def map[Z2](f: (Z) ⇒ Z2)(implicit trace: ZTraceElement): ZSink[R, E, In, L, Z2]

    Permalink

    Transforms this sink's result.

  31. def mapError[E2](f: (E) ⇒ E2)(implicit trace: ZTraceElement): ZSink[R, E2, In, L, Z]

    Permalink

    Transforms the errors emitted by this sink using f.

  32. def mapZIO[R1 <: R, E1 >: E, Z1](f: (Z) ⇒ ZIO[R1, E1, Z1])(implicit trace: ZTraceElement): ZSink[R1, E1, In, L, Z1]

    Permalink

    Effectfully transforms this sink's result.

  33. def orElse[R1 <: R, In1 <: In, E2 >: E, L1 >: L, Z1 >: Z](that: ⇒ ZSink[R1, E2, In1, L1, Z1])(implicit trace: ZTraceElement): ZSink[R1, E2, In1, L1, Z1]

    Permalink
  34. def provideEnvironment(r: ⇒ ZEnvironment[R])(implicit ev: NeedsEnv[R], trace: ZTraceElement): ZSink[Any, E, In, L, Z]

    Permalink

    Provides the sink with its required environment, which eliminates its dependency on R.

  35. final def race[R1 <: R, E1 >: E, A0, In1 <: In, L1 >: L, Z1 >: Z](that: ⇒ ZSink[R1, E1, In1, L1, Z1])(implicit trace: ZTraceElement): ZSink[R1, E1, In1, L1, Z1]

    Permalink

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

  36. final def raceBoth[R1 <: R, E1 >: E, A0, In1 <: In, L1 >: L, Z2](that: ⇒ ZSink[R1, E1, In1, L1, Z2], capacity: ⇒ Int = 16)(implicit trace: ZTraceElement): ZSink[R1, E1, In1, L1, Either[Z, Z2]]

    Permalink

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

  37. final def raceWith[R1 <: R, E1 >: E, A0, In1 <: In, L1 >: L, Z1, Z2](that: ⇒ ZSink[R1, E1, In1, L1, Z1], capacity: ⇒ Int = 16)(leftDone: (Exit[E, Z]) ⇒ MergeDecision[R1, E1, Z1, E1, Z2], rightDone: (Exit[E1, Z1]) ⇒ MergeDecision[R1, E, Z, E1, Z2])(implicit trace: ZTraceElement): ZSink[R1, E1, In1, L1, Z2]

    Permalink

    Runs both sinks in parallel on the input, using the specified merge function as soon as one result or the other has been computed.

  38. def repeat(implicit ev: <:<[L, In], trace: ZTraceElement): ZSink[R, E, In, L, Chunk[Z]]

    Permalink
  39. final def summarized[R1 <: R, E1 >: E, B, C](summary: ⇒ ZIO[R1, E1, B])(f: (B, B) ⇒ C)(implicit trace: ZTraceElement): ZSink[R1, E1, In, L, (Z, C)]

    Permalink

    Summarize a sink by running an effect when the sink starts and again when it completes

  40. final def timed(implicit trace: ZTraceElement): ZSink[R with Clock, E, In, L, (Z, zio.Duration)]

    Permalink

    Returns the sink that executes this one and times its execution.

  41. def toString(): String

    Permalink
    Definition Classes
    Any
  42. def untilOutputZIO[R1 <: R, E1 >: E](f: (Z) ⇒ ZIO[R1, E1, Boolean])(implicit ev: <:<[L, In], trace: ZTraceElement): ZSink[R1, E1, In, L, Option[Z]]

    Permalink

    Creates a sink that produces values until one verifies the predicate f.

  43. def zip[R1 <: R, In1 <: In, E1 >: E, L1 >: L <: In1, Z1](that: ⇒ ZSink[R1, E1, In1, L1, Z1])(implicit zippable: Zippable[Z, Z1], ev: <:<[L, In1], trace: ZTraceElement): ZSink[R1, E1, In1, L1, Out]

    Permalink
  44. final def zipLeft[R1 <: R, In1 <: In, E1 >: E, L1 >: L <: In1, Z1](that: ⇒ ZSink[R1, E1, In1, L1, Z1])(implicit ev: <:<[L, In1], trace: ZTraceElement): ZSink[R1, E1, In1, L1, Z]

    Permalink

    Like zip, but keeps only the result from the that sink.

  45. final def zipPar[R1 <: R, In1 <: In, E1 >: E, L1 >: L <: In1, Z1](that: ⇒ ZSink[R1, E1, In1, L1, Z1])(implicit zippable: Zippable[Z, Z1], trace: ZTraceElement): ZSink[R1, E1, In1, L1, Out]

    Permalink

    Runs both sinks in parallel on the input and combines the results in a tuple.

  46. final def zipParLeft[R1 <: R, In1 <: In, E1 >: E, L1 >: L <: In1, Z1](that: ⇒ ZSink[R1, E1, In1, L1, Z1])(implicit trace: ZTraceElement): ZSink[R1, E1, In1, L1, Z]

    Permalink

    Like zipPar, but keeps only the result from this sink.

  47. final def zipParRight[R1 <: R, In1 <: In, E1 >: E, L1 >: L <: In1, Z1](that: ⇒ ZSink[R1, E1, In1, L1, Z1])(implicit trace: ZTraceElement): ZSink[R1, E1, In1, L1, Z1]

    Permalink

    Like zipPar, but keeps only the result from the that sink.

  48. final def zipRight[R1 <: R, In1 <: In, E1 >: E, L1 >: L <: In1, Z1](that: ⇒ ZSink[R1, E1, In1, L1, Z1])(implicit ev: <:<[L, In1], trace: ZTraceElement): ZSink[R1, E1, In1, L1, Z1]

    Permalink

    Like zip, but keeps only the result from this sink.

  49. final def zipWith[R1 <: R, E1 >: E, In1 <: In, L1 >: L <: In1, Z1, Z2](that: ⇒ ZSink[R1, E1, In1, L1, Z1])(f: (Z, Z1) ⇒ Z2)(implicit ev: <:<[L, In1], trace: ZTraceElement): ZSink[R1, E1, In1, L1, Z2]

    Permalink

    Feeds inputs to this sink until it yields a result, then switches over to the provided sink until it yields a result, finally combining the two results with f.

  50. final def zipWithPar[R1 <: R, E1 >: E, In1 <: In, L1 >: L <: In1, Z1, Z2](that: ⇒ ZSink[R1, E1, In1, L1, Z1])(f: (Z, Z1) ⇒ Z2)(implicit trace: ZTraceElement): ZSink[R1, E1, In1, L1, Z2]

    Permalink

    Runs both sinks in parallel on the input and combines the results using the provided function.

  51. final def |[R1 <: R, E1 >: E, In1 <: In, L1 >: L, Z1 >: Z](that: ⇒ ZSink[R1, E1, In1, L1, Z1])(implicit trace: ZTraceElement): ZSink[R1, E1, In1, L1, Z1]

    Permalink

    Operator alias for race.

Deprecated Value Members

  1. def contramapChunksM[R1 <: R, E1 >: E, In1](f: (Chunk[In1]) ⇒ ZIO[R1, E1, Chunk[In]])(implicit trace: ZTraceElement): ZSink[R1, E1, In1, L, Z]

    Permalink

    Effectfully transforms this sink's input chunks.

    Effectfully transforms this sink's input chunks. f must preserve chunking-invariance

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use contramapChunksZIO

  2. def contramapM[R1 <: R, E1 >: E, In1](f: (In1) ⇒ ZIO[R1, E1, In])(implicit trace: ZTraceElement): ZSink[R1, E1, In1, L, Z]

    Permalink

    Effectfully transforms this sink's input elements.

    Effectfully transforms this sink's input elements.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use contramapZIO

  3. def dimapChunksM[R1 <: R, E1 >: E, In1, Z1](f: (Chunk[In1]) ⇒ ZIO[R1, E1, Chunk[In]], g: (Z) ⇒ ZIO[R1, E1, Z1])(implicit trace: ZTraceElement): ZSink[R1, E1, In1, L, Z1]

    Permalink

    Effectfully transforms both input chunks and result of this sink using the provided functions.

    Effectfully transforms both input chunks and result of this sink using the provided functions. f and g must preserve chunking-invariance

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use dimapChunksZIO

  4. def dimapM[R1 <: R, E1 >: E, In1, Z1](f: (In1) ⇒ ZIO[R1, E1, In], g: (Z) ⇒ ZIO[R1, E1, Z1])(implicit trace: ZTraceElement): ZSink[R1, E1, In1, L, Z1]

    Permalink

    Effectfully transforms both inputs and result of this sink using the provided functions.

    Effectfully transforms both inputs and result of this sink using the provided functions.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use dimapZIO

  5. def filterInputM[R1 <: R, E1 >: E, In1 <: In](p: (In1) ⇒ ZIO[R1, E1, Boolean])(implicit trace: ZTraceElement): ZSink[R1, E1, In1, L, Z]

    Permalink
    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use filterInputZIO

  6. def foldM[R1 <: R, E2, In1 <: In, L1 >: L <: In1, Z1](failure: (E) ⇒ ZSink[R1, E2, In1, L1, Z1], success: (Z) ⇒ ZSink[R1, E2, In1, L1, Z1])(implicit ev: <:<[L, In1], trace: ZTraceElement): ZSink[R1, E2, In1, L1, Z1]

    Permalink
    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use foldSink

  7. def mapM[R1 <: R, E1 >: E, Z1](f: (Z) ⇒ ZIO[R1, E1, Z1])(implicit trace: ZTraceElement): ZSink[R1, E1, In, L, Z1]

    Permalink

    Effectfully transforms this sink's result.

    Effectfully transforms this sink's result.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use mapZIO

  8. def untilOutputM[R1 <: R, E1 >: E](f: (Z) ⇒ ZIO[R1, E1, Boolean])(implicit ev: <:<[L, In], trace: ZTraceElement): ZSink[R1, E1, In, L, Option[Z]]

    Permalink

    Creates a sink that produces values until one verifies the predicate f.

    Creates a sink that produces values until one verifies the predicate f.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use untilOutputZIO

Inherited from AnyVal

Inherited from Any

Ungrouped