Class

fs2.Stream

ToEffect

Related Doc: package Stream

Permalink

final class ToEffect[F[_], O] extends AnyVal

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. ToEffect
  2. AnyVal
  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
    Any
  2. final def ##(): Int

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

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

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

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

    Permalink
    Definition Classes
    Any
  7. def drain(implicit F: Sync[F]): F[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.

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

  8. def ensuring(cond: (ToEffect[F, O]) ⇒ Boolean, msg: ⇒ Any): ToEffect[F, O]

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

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

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

    Permalink
    Implicit information
    This member is added by an implicit conversion from ToEffect[F, O] to Ensuring[ToEffect[F, O]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  12. def fold[B](init: B)(f: (B, O) ⇒ B)(implicit F: Sync[F]): F[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.

    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.

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

  13. def foldMonoid(implicit F: Sync[F], O: Monoid[O]): F[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
  14. def foldSemigroup(implicit F: Sync[F], O: Semigroup[O]): F[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
  15. def formatted(fmtstr: String): String

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

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

    Permalink
    Definition Classes
    Any
  18. def last(implicit F: Sync[F]): F[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)
  19. def toList(implicit F: Sync[F]): F[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.

    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)
  20. def toString(): String

    Permalink
    Definition Classes
    Any
  21. def toVector(implicit F: Sync[F]): F[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.

    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)
  22. def [B](y: B): (ToEffect[F, O], B)

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

Inherited from AnyVal

Inherited from Any

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

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

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

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

Ungrouped