Class

fs2.Stream

CompileOps

Related Doc: package Stream

Permalink

final class CompileOps[F[_], G[_], O] extends AnyRef

Projection of a Stream providing various ways to compile a Stream[F,O] to an F[...].

Source
Stream.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CompileOps
  2. AnyRef
  3. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from CompileOps[F, G, O] to any2stringadd[CompileOps[F, G, O]] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (CompileOps[F, G, O], B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from CompileOps[F, G, O] to ArrowAssoc[CompileOps[F, G, O]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @throws( ... )
  8. def drain: G[Unit]

    Permalink

    Compiles this stream in to a value of the target effect type F and discards any output values of the stream.

    Compiles this stream in to a value of the target effect type F and discards any output values of the stream.

    To access the output values of the stream, use one of the other compilation methods -- e.g., fold, toVector, etc.

  9. def ensuring(cond: (CompileOps[F, G, O]) ⇒ Boolean, msg: ⇒ Any): CompileOps[F, G, O]

    Permalink
    Implicit information
    This member is added by an implicit conversion from CompileOps[F, G, O] to Ensuring[CompileOps[F, G, O]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  10. def ensuring(cond: (CompileOps[F, G, O]) ⇒ Boolean): CompileOps[F, G, O]

    Permalink
    Implicit information
    This member is added by an implicit conversion from CompileOps[F, G, O] to Ensuring[CompileOps[F, G, O]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  11. def ensuring(cond: Boolean, msg: ⇒ Any): CompileOps[F, G, O]

    Permalink
    Implicit information
    This member is added by an implicit conversion from CompileOps[F, G, O] to Ensuring[CompileOps[F, G, O]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  12. def ensuring(cond: Boolean): CompileOps[F, G, O]

    Permalink
    Implicit information
    This member is added by an implicit conversion from CompileOps[F, G, O] to Ensuring[CompileOps[F, G, O]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  13. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  14. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  15. def fold[B](init: B)(f: (B, O) ⇒ B): G[B]

    Permalink

    Compiles this stream in to a value of the target effect type F by folding the output values together, starting with the provided init and combining the current value with each output value.

  16. def foldChunks[B](init: B)(f: (B, Chunk[O]) ⇒ B): G[B]

    Permalink

    Compiles this stream in to a value of the target effect type F by folding the output chunks together, starting with the provided init and combining the current value with each output chunk.

    Compiles this stream in to a value of the target effect type F by folding the output chunks together, starting with the provided init and combining the current value with each output chunk.

    When this method has returned, the stream has not begun execution -- this method simply compiles the stream down to the target effect type.

  17. def foldMonoid(implicit O: Monoid[O]): G[O]

    Permalink

    Like fold but uses the implicitly available Monoid[O] to combine elements.

    Like fold but uses the implicitly available Monoid[O] to combine elements.

    Example:
    1. scala> import cats.implicits._, cats.effect.IO
      scala> Stream(1, 2, 3, 4, 5).covary[IO].compile.foldMonoid.unsafeRunSync
      res0: Int = 15
  18. def foldSemigroup(implicit O: Semigroup[O]): G[Option[O]]

    Permalink

    Like fold but uses the implicitly available Semigroup[O] to combine elements.

    Like fold but uses the implicitly available Semigroup[O] to combine elements. If the stream emits no elements, None is returned.

    Example:
    1. scala> import cats.implicits._, cats.effect.IO
      scala> Stream(1, 2, 3, 4, 5).covary[IO].compile.foldSemigroup.unsafeRunSync
      res0: Option[Int] = Some(15)
      scala> Stream.empty.covaryAll[IO, Int].compile.foldSemigroup.unsafeRunSync
      res1: Option[Int] = None
  19. def formatted(fmtstr: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from CompileOps[F, G, O] to StringFormat[CompileOps[F, G, O]] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  20. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  21. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  22. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  23. def last: G[Option[O]]

    Permalink

    Compiles this stream in to a value of the target effect type F, returning None if the stream emitted no values and returning the last value emitted wrapped in Some if values were emitted.

    Compiles this stream in to a value of the target effect type F, returning None if the stream emitted no values and returning the last value emitted wrapped in Some if values were emitted.

    When this method has returned, the stream has not begun execution -- this method simply compiles the stream down to the target effect type.

    Example:
    1. scala> import cats.effect.IO
      scala> Stream.range(0,100).take(5).covary[IO].compile.last.unsafeRunSync
      res0: Option[Int] = Some(4)
  24. def lastOrError(implicit G: MonadError[G, Throwable]): G[O]

    Permalink

    Compiles this stream in to a value of the target effect type F, raising a NoSuchElementException if the stream emitted no values and returning the last value emitted otherwise.

    Compiles this stream in to a value of the target effect type F, raising a NoSuchElementException if the stream emitted no values and returning the last value emitted otherwise.

    When this method has returned, the stream has not begun execution -- this method simply compiles the stream down to the target effect type.

    Example:
    1. scala> import cats.effect.IO
      scala> Stream.range(0,100).take(5).covary[IO].compile.lastOrError.unsafeRunSync
      res0: Int = 4
      scala> Stream.empty.covaryAll[IO, Int].compile.lastOrError.attempt.unsafeRunSync
      res1: Either[Throwable, Int] = Left(java.util.NoSuchElementException)
  25. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  26. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  27. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  28. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  29. def to[C[_]](implicit cbf: CanBuildFrom[Nothing, O, C[O]]): G[C[O]]

    Permalink

    Compiles this stream into a value of the target effect type F by logging the output values to a C, given a CanBuildFrom.

    Compiles this stream into a value of the target effect type F by logging the output values to a C, given a CanBuildFrom.

    When this method has returned, the stream has not begun execution -- this method simply compiles the stream down to the target effect type.

    Example:
    1. scala> import cats.effect.IO
      scala> Stream.range(0,100).take(5).covary[IO].compile.to[List].unsafeRunSync
      res0: List[Int] = List(0, 1, 2, 3, 4)
  30. def toChunk: G[Chunk[O]]

    Permalink

    Compiles this stream in to a value of the target effect type F by logging the output values to a Chunk.

    Compiles this stream in to a value of the target effect type F by logging the output values to a Chunk.

    When this method has returned, the stream has not begun execution -- this method simply compiles the stream down to the target effect type.

    Example:
    1. scala> import cats.effect.IO
      scala> Stream.range(0,100).take(5).covary[IO].compile.toChunk.unsafeRunSync
      res0: Chunk[Int] = Chunk(0, 1, 2, 3, 4)
  31. def toList: G[List[O]]

    Permalink

    Compiles this stream in to a value of the target effect type F by logging the output values to a List.

    Compiles this stream in to a value of the target effect type F by logging the output values to a List. Equivalent to to[List].

    When this method has returned, the stream has not begun execution -- this method simply compiles the stream down to the target effect type.

    Example:
    1. scala> import cats.effect.IO
      scala> Stream.range(0,100).take(5).covary[IO].compile.toList.unsafeRunSync
      res0: List[Int] = List(0, 1, 2, 3, 4)
  32. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  33. def toVector: G[Vector[O]]

    Permalink

    Compiles this stream in to a value of the target effect type F by logging the output values to a Vector.

    Compiles this stream in to a value of the target effect type F by logging the output values to a Vector. Equivalent to to[Vector].

    When this method has returned, the stream has not begun execution -- this method simply compiles the stream down to the target effect type.

    Example:
    1. scala> import cats.effect.IO
      scala> Stream.range(0,100).take(5).covary[IO].compile.toVector.unsafeRunSync
      res0: Vector[Int] = Vector(0, 1, 2, 3, 4)
  34. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  37. def [B](y: B): (CompileOps[F, G, O], B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from CompileOps[F, G, O] to ArrowAssoc[CompileOps[F, G, O]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Deprecated Value Members

  1. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from CompileOps[F, G, O] to any2stringadd[CompileOps[F, G, O]]

Inherited by implicit conversion StringFormat from CompileOps[F, G, O] to StringFormat[CompileOps[F, G, O]]

Inherited by implicit conversion Ensuring from CompileOps[F, G, O] to Ensuring[CompileOps[F, G, O]]

Inherited by implicit conversion ArrowAssoc from CompileOps[F, G, O] to ArrowAssoc[CompileOps[F, G, O]]

Ungrouped