final class ZSink[-R, -InErr, -In, +OutErr, +L, +Z] extends AnyVal
- Self Type
- ZSink[R, InErr, In, OutErr, L, Z]
- Alphabetic
- By Inheritance
- ZSink
- AnyVal
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- Any
- final def ##: Int
- Definition Classes
- Any
- final def &>[R1 <: R, InErr1 <: InErr, OutErr1 >: OutErr, A0, In1 <: In, L1 >: L <: In1, Z1](that: ZSink[R1, InErr1, In1, OutErr1, L1, Z1])(implicit ev: <:<[L, In1], trace: ZTraceElement): ZSink[R1, InErr1, In1, OutErr1, L1, Z1]
Operator alias for zipParRight.
- final def *>[R1 <: R, InErr1 <: InErr, OutErr1 >: OutErr, A0, In1 <: In, L1 >: L <: In1, Z1](that: ZSink[R1, InErr1, In1, OutErr1, L1, Z1])(implicit ev: <:<[L, In1], trace: ZTraceElement): ZSink[R1, InErr1, In1, OutErr1, L1, Z1]
Operator alias for zipRight.
- final def <&[R1 <: R, InErr1 <: InErr, OutErr1 >: OutErr, A0, In1 <: In, L1 >: L <: In1, Z1](that: ZSink[R1, InErr1, In1, OutErr1, L1, Z1])(implicit ev: <:<[L, In1], trace: ZTraceElement): ZSink[R1, InErr1, In1, OutErr1, L1, Z]
Operator alias for zipParLeft.
- final def <&>[R1 <: R, InErr1 <: InErr, OutErr1 >: OutErr, A0, In1 <: In, L1 >: L <: In1, Z1](that: ZSink[R1, InErr1, In1, OutErr1, L1, Z1])(implicit zippable: Zippable[Z, Z1], trace: ZTraceElement): ZSink[R1, InErr1, In1, OutErr1, L1, Out]
Operator alias for zipPar.
- final def <*[R1 <: R, InErr1 <: InErr, OutErr1 >: OutErr, A0, In1 <: In, L1 >: L <: In1, Z1](that: ZSink[R1, InErr1, In1, OutErr1, L1, Z1])(implicit ev: <:<[L, In1], trace: ZTraceElement): ZSink[R1, InErr1, In1, OutErr1, L1, Z]
Operator alias for zipLeft.
- final def <*>[R1 <: R, InErr1 <: InErr, OutErr1 >: OutErr, A0, In1 <: In, L1 >: L <: In1, Z1](that: ZSink[R1, InErr1, In1, OutErr1, L1, Z1])(implicit zippable: Zippable[Z, Z1], ev: <:<[L, In1], trace: ZTraceElement): ZSink[R1, InErr1, In1, OutErr1, L1, Out]
Operator alias for zip.
- final def ==(arg0: Any): Boolean
- Definition Classes
- Any
- def as[Z2](z: => Z2)(implicit trace: ZTraceElement): ZSink[R, InErr, In, OutErr, L, Z2]
Replaces this sink's result with the provided value.
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- val channel: ZChannel[R, InErr, Chunk[In], Any, OutErr, Chunk[L], Z]
- def collectAllWhileWith[S](z: S)(p: (Z) => Boolean)(f: (S, Z) => S)(implicit ev: <:<[L, In], trace: ZTraceElement): ZSink[R, InErr, In, OutErr, L, S]
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 functionf. - def contramap[In1](f: (In1) => In)(implicit trace: ZTraceElement): ZSink[R, InErr, In1, OutErr, L, Z]
Transforms this sink's input elements.
- def contramapChunks[In1](f: (Chunk[In1]) => Chunk[In])(implicit trace: ZTraceElement): ZSink[R, InErr, In1, OutErr, L, Z]
Transforms this sink's input chunks.
Transforms this sink's input chunks.
fmust preserve chunking-invariance - def contramapChunksZIO[R1 <: R, InErr1 <: InErr, In1](f: (Chunk[In1]) => ZIO[R1, InErr1, Chunk[In]])(implicit trace: ZTraceElement): ZSink[R1, InErr1, In1, OutErr, L, Z]
Effectfully transforms this sink's input chunks.
Effectfully transforms this sink's input chunks.
fmust preserve chunking-invariance - def contramapZIO[R1 <: R, InErr1 <: InErr, In1](f: (In1) => ZIO[R1, InErr1, In])(implicit trace: ZTraceElement): ZSink[R1, InErr1, In1, OutErr, L, Z]
Effectfully transforms this sink's input elements.
- def dimap[In1, Z1](f: (In1) => In, g: (Z) => Z1)(implicit trace: ZTraceElement): ZSink[R, InErr, In1, OutErr, L, Z1]
Transforms both inputs and result of this sink using the provided functions.
- def dimapChunks[In1, Z1](f: (Chunk[In1]) => Chunk[In], g: (Z) => Z1)(implicit trace: ZTraceElement): ZSink[R, InErr, In1, OutErr, L, Z1]
Transforms both input chunks and result of this sink using the provided functions.
- def dimapChunksZIO[R1 <: R, InErr1 <: InErr, OutErr1 >: OutErr, In1, Z1](f: (Chunk[In1]) => ZIO[R1, InErr1, Chunk[In]], g: (Z) => ZIO[R1, OutErr1, Z1])(implicit trace: ZTraceElement): ZSink[R1, InErr1, In1, OutErr1, L, Z1]
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.
fandgmust preserve chunking-invariance - def dimapZIO[R1 <: R, InErr1 <: InErr, OutErr1 >: OutErr, In1, Z1](f: (In1) => ZIO[R1, InErr1, In], g: (Z) => ZIO[R1, OutErr1, Z1])(implicit trace: ZTraceElement): ZSink[R1, InErr1, In1, OutErr1, L, Z1]
Effectfully transforms both inputs and result of this sink using the provided functions.
- def dropLeftover(implicit trace: ZTraceElement): ZSink[R, InErr, In, OutErr, Nothing, Z]
- def exposeLeftover(implicit trace: ZTraceElement): ZSink[R, InErr, In, OutErr, Nothing, (Z, Chunk[L])]
- def filterInput[In1 <: In](p: (In1) => Boolean)(implicit trace: ZTraceElement): ZSink[R, InErr, In1, OutErr, L, Z]
- def filterInputZIO[R1 <: R, InErr1 <: InErr, In1 <: In](p: (In1) => ZIO[R1, InErr1, Boolean])(implicit trace: ZTraceElement): ZSink[R1, InErr1, In1, OutErr, L, Z]
- def flatMap[R1 <: R, InErr1 <: InErr, OutErr1 >: OutErr, In1 <: In, L1 >: L <: In1, Z1](f: (Z) => ZSink[R1, InErr1, In1, OutErr1, L1, Z1])(implicit ev: <:<[L, In1], trace: ZTraceElement): ZSink[R1, InErr1, In1, OutErr1, L1, Z1]
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.
- def foldSink[R1 <: R, InErr1 <: InErr, OutErr2, In1 <: In, L1 >: L <: In1, Z1](failure: (OutErr) => ZSink[R1, InErr1, In1, OutErr2, L1, Z1], success: (Z) => ZSink[R1, InErr1, In1, OutErr2, L1, Z1])(implicit ev: <:<[L, In1], trace: ZTraceElement): ZSink[R1, InErr1, In1, OutErr2, L1, Z1]
- def getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def map[Z2](f: (Z) => Z2)(implicit trace: ZTraceElement): ZSink[R, InErr, In, OutErr, L, Z2]
Transforms this sink's result.
- def mapError[OutErr2](f: (OutErr) => OutErr2)(implicit trace: ZTraceElement): ZSink[R, InErr, In, OutErr2, L, Z]
Transforms the errors emitted by this sink using
f. - def mapZIO[R1 <: R, OutErr1 >: OutErr, Z1](f: (Z) => ZIO[R1, OutErr1, Z1])(implicit trace: ZTraceElement): ZSink[R1, InErr, In, OutErr1, L, Z1]
Effectfully transforms this sink's result.
- def orElse[R1 <: R, InErr1 <: InErr, In1 <: In, OutErr2 >: OutErr, L1 >: L, Z1 >: Z](that: => ZSink[R1, InErr1, In1, OutErr2, L1, Z1])(implicit trace: ZTraceElement): ZSink[R1, InErr1, In1, OutErr2, L1, Z1]
- def provideEnvironment(r: ZEnvironment[R])(implicit ev: NeedsEnv[R], trace: ZTraceElement): ZSink[Any, InErr, In, OutErr, L, Z]
Provides the sink with its required environment, which eliminates its dependency on
R. - final def race[R1 <: R, InErr1 <: InErr, OutErr1 >: OutErr, A0, In1 <: In, L1 >: L, Z1 >: Z](that: ZSink[R1, InErr1, In1, OutErr1, L1, Z1])(implicit trace: ZTraceElement): ZSink[R1, InErr1, In1, OutErr1, L1, Z1]
Runs both sinks in parallel on the input, , returning the result or the error from the one that finishes first.
- final def raceBoth[R1 <: R, InErr1 <: InErr, OutErr1 >: OutErr, A0, In1 <: In, L1 >: L, Z1 >: Z](that: ZSink[R1, InErr1, In1, OutErr1, L1, Z1], capacity: Int = 16)(implicit trace: ZTraceElement): ZSink[R1, InErr1, In1, OutErr1, L1, Either[Z, Z1]]
Runs both sinks in parallel on the input, returning the result or the error from the one that finishes first.
- final def raceWith[R1 <: R, InErr1 <: InErr, OutErr1 >: OutErr, A0, In1 <: In, L1 >: L, Z1, Z2](that: ZSink[R1, InErr1, In1, OutErr1, L1, Z1], capacity: Int = 16)(leftDone: (Exit[OutErr, Z]) => MergeDecision[R1, OutErr1, Z1, OutErr1, Z2], rightDone: (Exit[OutErr1, Z1]) => MergeDecision[R1, OutErr, Z, OutErr1, Z2])(implicit trace: ZTraceElement): ZSink[R1, InErr1, In1, OutErr1, L1, Z2]
Runs both sinks in parallel on the input, using the specified merge function as soon as one result or the other has been computed.
- def repeat(implicit ev: <:<[L, In], trace: ZTraceElement): ZSink[R, InErr, In, OutErr, L, Chunk[Z]]
- final def summarized[R1 <: R, E1 >: OutErr, B, C](summary: ZIO[R1, E1, B])(f: (B, B) => C)(implicit trace: ZTraceElement): ZSink[R1, InErr, In, E1, L, (Z, C)]
Summarize a sink by running an effect when the sink starts and again when it completes
- final def timed(implicit trace: ZTraceElement): ZSink[R with Clock, InErr, In, OutErr, L, (Z, zio.Duration)]
Returns the sink that executes this one and times its execution.
- def toString(): String
- Definition Classes
- Any
- def untilOutputZIO[R1 <: R, OutErr1 >: OutErr](f: (Z) => ZIO[R1, OutErr1, Boolean])(implicit ev: <:<[L, In], trace: ZTraceElement): ZSink[R1, InErr, In, OutErr1, L, Option[Z]]
Creates a sink that produces values until one verifies the predicate
f. - def zip[R1 <: R, InErr1 <: InErr, In1 <: In, OutErr1 >: OutErr, L1 >: L <: In1, Z1](that: ZSink[R1, InErr1, In1, OutErr1, L1, Z1])(implicit zippable: Zippable[Z, Z1], ev: <:<[L, In1], trace: ZTraceElement): ZSink[R1, InErr1, In1, OutErr1, L1, Out]
- final def zipLeft[R1 <: R, InErr1 <: InErr, In1 <: In, OutErr1 >: OutErr, L1 >: L <: In1, Z1](that: ZSink[R1, InErr1, In1, OutErr1, L1, Z1])(implicit ev: <:<[L, In1], trace: ZTraceElement): ZSink[R1, InErr1, In1, OutErr1, L1, Z]
Like zip, but keeps only the result from the
thatsink. - final def zipPar[R1 <: R, InErr1 <: InErr, In1 <: In, OutErr1 >: OutErr, L1 >: L <: In1, Z1](that: ZSink[R1, InErr1, In1, OutErr1, L1, Z1])(implicit zippable: Zippable[Z, Z1], trace: ZTraceElement): ZSink[R1, InErr1, In1, OutErr1, L1, Out]
Runs both sinks in parallel on the input and combines the results in a tuple.
- final def zipParLeft[R1 <: R, InErr1 <: InErr, In1 <: In, OutErr1 >: OutErr, L1 >: L <: In1, Z1](that: ZSink[R1, InErr1, In1, OutErr1, L1, Z1])(implicit trace: ZTraceElement): ZSink[R1, InErr1, In1, OutErr1, L1, Z]
Like zipPar, but keeps only the result from this sink.
- final def zipParRight[R1 <: R, InErr1 <: InErr, In1 <: In, OutErr1 >: OutErr, L1 >: L <: In1, Z1](that: ZSink[R1, InErr1, In1, OutErr1, L1, Z1])(implicit trace: ZTraceElement): ZSink[R1, InErr1, In1, OutErr1, L1, Z1]
Like zipPar, but keeps only the result from the
thatsink. - final def zipRight[R1 <: R, InErr1 <: InErr, In1 <: In, OutErr1 >: OutErr, L1 >: L <: In1, Z1](that: ZSink[R1, InErr1, In1, OutErr1, L1, Z1])(implicit ev: <:<[L, In1], trace: ZTraceElement): ZSink[R1, InErr1, In1, OutErr1, L1, Z1]
Like zip, but keeps only the result from this sink.
- final def zipWith[R1 <: R, InErr1 <: InErr, OutErr1 >: OutErr, In1 <: In, L1 >: L <: In1, Z1, Z2](that: ZSink[R1, InErr1, In1, OutErr1, L1, Z1])(f: (Z, Z1) => Z2)(implicit ev: <:<[L, In1], trace: ZTraceElement): ZSink[R1, InErr1, In1, OutErr1, L1, Z2]
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. - final def zipWithPar[R1 <: R, InErr1 <: InErr, OutErr1 >: OutErr, In1 <: In, L1 >: L <: In1, Z1, Z2](that: ZSink[R1, InErr1, In1, OutErr1, L1, Z1], capacity: Int = 16)(f: (Z, Z1) => Z2)(implicit trace: ZTraceElement): ZSink[R1, InErr1, In1, OutErr1, L1, Z2]
Runs both sinks in parallel on the input and combines the results using the provided function.
- final def |[R1 <: R, InErr1 <: InErr, OutErr1 >: OutErr, A0, In1 <: In, L1 >: L, Z1 >: Z](that: ZSink[R1, InErr1, In1, OutErr1, L1, Z1])(implicit trace: ZTraceElement): ZSink[R1, InErr1, In1, OutErr1, L1, Z1]
Operator alias for race.
Deprecated Value Members
- def contramapChunksM[R1 <: R, InErr1 <: InErr, In1](f: (Chunk[In1]) => ZIO[R1, InErr1, Chunk[In]])(implicit trace: ZTraceElement): ZSink[R1, InErr1, In1, OutErr, L, Z]
Effectfully transforms this sink's input chunks.
Effectfully transforms this sink's input chunks.
fmust preserve chunking-invariance- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use contramapChunksZIO
- def contramapM[R1 <: R, InErr1 <: InErr, In1](f: (In1) => ZIO[R1, InErr1, In])(implicit trace: ZTraceElement): ZSink[R1, InErr1, In1, OutErr, L, Z]
Effectfully transforms this sink's input elements.
Effectfully transforms this sink's input elements.
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use contramapZIO
- def dimapChunksM[R1 <: R, InErr1 <: InErr, OutErr1 >: OutErr, In1, Z1](f: (Chunk[In1]) => ZIO[R1, InErr1, Chunk[In]], g: (Z) => ZIO[R1, OutErr1, Z1])(implicit trace: ZTraceElement): ZSink[R1, InErr1, In1, OutErr1, L, Z1]
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.
fandgmust preserve chunking-invariance- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use dimapChunksZIO
- def dimapM[R1 <: R, InErr1 <: InErr, OutErr1 >: OutErr, In1, Z1](f: (In1) => ZIO[R1, InErr1, In], g: (Z) => ZIO[R1, OutErr1, Z1])(implicit trace: ZTraceElement): ZSink[R1, InErr1, In1, OutErr1, L, Z1]
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
- def filterInputM[R1 <: R, InErr1 <: InErr, In1 <: In](p: (In1) => ZIO[R1, InErr1, Boolean])(implicit trace: ZTraceElement): ZSink[R1, InErr1, In1, OutErr, L, Z]
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use filterInputZIO
- def foldM[R1 <: R, InErr1 <: InErr, OutErr2, In1 <: In, L1 >: L <: In1, Z1](failure: (OutErr) => ZSink[R1, InErr1, In1, OutErr2, L1, Z1], success: (Z) => ZSink[R1, InErr1, In1, OutErr2, L1, Z1])(implicit ev: <:<[L, In1], trace: ZTraceElement): ZSink[R1, InErr1, In1, OutErr2, L1, Z1]
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use foldSink
- def mapM[R1 <: R, OutErr1 >: OutErr, Z1](f: (Z) => ZIO[R1, OutErr1, Z1])(implicit trace: ZTraceElement): ZSink[R1, InErr, In, OutErr1, L, Z1]
Effectfully transforms this sink's result.
Effectfully transforms this sink's result.
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use mapZIO
- def untilOutputM[R1 <: R, OutErr1 >: OutErr](f: (Z) => ZIO[R1, OutErr1, Boolean])(implicit ev: <:<[L, In], trace: ZTraceElement): ZSink[R1, InErr, In, OutErr1, L, Option[Z]]
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