Packages

c

fs2.Stream

InvariantOps

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

Provides syntax for streams that are invariant in F and O.

Source
Stream.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. InvariantOps
  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
    Definition Classes
    Any
  2. final def ##(): Int
    Definition Classes
    Any
  3. def +(other: String): String
    Implicit
    This member is added by an implicit conversion from InvariantOps[F, O] to any2stringadd[InvariantOps[F, O]] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (InvariantOps[F, O], B)
    Implicit
    This member is added by an implicit conversion from InvariantOps[F, O] to ArrowAssoc[InvariantOps[F, O]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean
    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def covary[F2[x] >: F[x]]: Stream[F2, O]

    Lifts this stream to the specified effect type.

    Lifts this stream to the specified effect type.

    Example:
    1. scala> import cats.effect.IO
      scala> Stream(1, 2, 3).covary[IO]
      res0: Stream[IO,Int] = Stream(..)
  8. def ensuring(cond: (InvariantOps[F, O]) ⇒ Boolean, msg: ⇒ Any): InvariantOps[F, O]
    Implicit
    This member is added by an implicit conversion from InvariantOps[F, O] to Ensuring[InvariantOps[F, O]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  9. def ensuring(cond: (InvariantOps[F, O]) ⇒ Boolean): InvariantOps[F, O]
    Implicit
    This member is added by an implicit conversion from InvariantOps[F, O] to Ensuring[InvariantOps[F, O]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  10. def ensuring(cond: Boolean, msg: ⇒ Any): InvariantOps[F, O]
    Implicit
    This member is added by an implicit conversion from InvariantOps[F, O] to Ensuring[InvariantOps[F, O]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  11. def ensuring(cond: Boolean): InvariantOps[F, O]
    Implicit
    This member is added by an implicit conversion from InvariantOps[F, O] to Ensuring[InvariantOps[F, O]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  12. def formatted(fmtstr: String): String
    Implicit
    This member is added by an implicit conversion from InvariantOps[F, O] to StringFormat[InvariantOps[F, O]] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  13. def getClass(): Class[_ <: AnyVal]
    Definition Classes
    AnyVal → Any
  14. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  15. def observe(p: Pipe[F, O, Unit])(implicit F: Concurrent[F]): Stream[F, O]

    Synchronously sends values through p.

    Synchronously sends values through p.

    If p fails, then resulting stream will fail. If p halts the evaluation will halt too.

    Note that observe will only output full chunks of O that are known to be successfully processed by p. So if p terminates/fails in the middle of chunk processing, the chunk will not be available in resulting stream.

    Note that if your pipe can be represented by an O => F[Unit], evalTap will provide much greater performance.

    Example:
    1. scala> import cats.effect.{ContextShift, IO}, cats.implicits._
      scala> implicit val cs: ContextShift[IO] = IO.contextShift(scala.concurrent.ExecutionContext.Implicits.global)
      scala> Stream(1, 2, 3).covary[IO].observe(_.showLinesStdOut).map(_ + 1).compile.toVector.unsafeRunSync
      res0: Vector[Int] = Vector(2, 3, 4)
  16. def observeAsync(maxQueued: Int)(p: Pipe[F, O, Unit])(implicit F: Concurrent[F]): Stream[F, O]

    Send chunks through p, allowing up to maxQueued pending _chunks_ before blocking s.

  17. def observeEither[L, R](left: Pipe[F, L, Unit], right: Pipe[F, R, Unit])(implicit F: Concurrent[F], ev: <:<[O, Either[L, R]]): Stream[F, Either[L, R]]

    Observes this stream of Either[L, R] values with two pipes, one that observes left values and another that observes right values.

    Observes this stream of Either[L, R] values with two pipes, one that observes left values and another that observes right values.

    If either of left or right fails, then resulting stream will fail. If either halts the evaluation will halt too.

  18. def pull: ToPull[F, O]

    Gets a projection of this stream that allows converting it to a Pull in a number of ways.

  19. def repeatPull[O2](using: (ToPull[F, O]) ⇒ Pull[F, O2, Option[Stream[F, O]]]): Stream[F, O2]

    Repeatedly invokes using, running the resultant Pull each time, halting when a pull returns None instead of Some(nextStream).

  20. def toString(): String
    Definition Classes
    Any
  21. def [B](y: B): (InvariantOps[F, O], B)
    Implicit
    This member is added by an implicit conversion from InvariantOps[F, O] to ArrowAssoc[InvariantOps[F, O]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Inherited from AnyVal

Inherited from Any

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

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

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

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

Ungrouped