trait Sink[-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
- Sink[R, E, A0, A, B]
- Alphabetic
- By Inheritance
- Sink
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
- abstract type State
Abstract Value Members
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##(): Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ?: Sink[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, producesNone. - final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- final def chunked[A1 >: A0, A2 <: A]: Sink[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. - def clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws(classOf[java.lang.CloneNotSupportedException])
- final def const[C](c: ⇒ C): Sink[R, E, A0, A, C]
- def contramap[C](f: (C) ⇒ A): Sink[R, E, A0, C, B]
- final def contramapM[R1 <: R, E1 >: E, C](f: (C) ⇒ ZIO[R1, E1, A]): Sink[R1, E1, A0, C, B]
- def dimap[C, D](f: (C) ⇒ A)(g: (B) ⇒ D): Sink[R, E, A0, C, D]
- final def dropWhile[A1 <: A](pred: (A1) ⇒ Boolean): Sink[R, E, A0, A1, B]
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def filter[A1 <: A](f: (A1) ⇒ Boolean): Sink[R, E, A0, A1, B]
Filters the inputs fed to this sink.
- final def filterM[R1 <: R, E1 >: E, A1 <: A](f: (A1) ⇒ IO[E1, Boolean]): Sink[R1, E1, A0, A1, B]
Effectfully filters the inputs fed to this sink.
- final def filterNot[A1 <: A](f: (A1) ⇒ Boolean): Sink[R, E, A0, A1, B]
- final def filterNotM[E1 >: E, A1 <: A](f: (A1) ⇒ IO[E1, Boolean]): Sink[R, E1, A0, A1, B]
- def finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def map[C](f: (B) ⇒ C): Sink[R, E, A0, A, C]
Maps the value produced by this sink.
- def mapError[E1](f: (E) ⇒ E1): Sink[R, E1, A0, A, B]
- final def mapM[R1 <: R, E1 >: E, C](f: (B) ⇒ ZIO[R1, E1, C]): Sink[R1, E1, A0, A, C]
Effectfully maps the value produced by this sink.
- def mapRemainder[A1](f: (A0) ⇒ A1): Sink[R, E, A1, A, B]
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def optional: Sink[R, Nothing, A0, A, Option[B]]
A named alias for
?. - def provideSome[R1](f: (R1) ⇒ R): Sink[R1, E, A0, A, B]
- final def race[R1 <: R, E1 >: E, A2 >: A0, A1 <: A, B1 >: B](that: Sink[R1, E1, A2, A1, B1]): Sink[R1, E1, A2, A1, B1]
Runs both sinks in parallel on the input, returning the result from the one that finishes successfully first.
- final def raceBoth[R1 <: R, E1 >: E, A2 >: A0, A1 <: A, C](that: Sink[R1, E1, A2, A1, C]): Sink[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.
- def stepChunk[A1 <: A](state: State, as: Chunk[A1]): ZIO[R, E, Step[State, A0]]
- final def synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- final def takeWhile[A1 <: A](pred: (A1) ⇒ Boolean): Sink[R, E, A0, A1, B]
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def untilOutput(f: (B) ⇒ Boolean): Sink[R, E, A0, A, B]
- final def update(state: Step[State, Nothing]): Sink[R, E, A0, A, B]
- final def void: Sink[R, E, A0, A, Unit]
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws(classOf[java.lang.InterruptedException])
- final def |[R1 <: R, E1 >: E, A2 >: A0, A1 <: A, B1 >: B](that: Sink[R1, E1, A2, A1, B1]): Sink[R1, E1, A2, A1, B1]
A named alias for
race.