Class/Object

fs2

Pull

Related Docs: object Pull | package fs2

Permalink

final class Pull[+F[_], +O, +R] extends AnyVal

A p: Pull[F,O,R] reads values from one or more streams, returns a result of type R, and produces a Stream[F,O] when calling p.stream.

Any resources acquired by p are freed following the call to stream.

Laws:

Pull forms a monad in R with pure and flatMap:

raiseError is caught by handleErrorWith:

Source
Pull.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Pull
  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 Pull[F, O, R] to any2stringadd[Pull[F, O, R]] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (Pull[F, O, R], B)

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

    Permalink
    Definition Classes
    Any
  6. def >>[F2[x] >: F[x], O2 >: O, R2](p2: ⇒ Pull[F2, O2, R2]): Pull[F2, O2, R2]

    Permalink

    Alias for flatMap(_ => p2).

  7. def as[R2](r2: R2): Pull[F, O, R2]

    Permalink

    Alias for _.map(_ => o2).

  8. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  9. def attempt: Pull[F, O, Either[Throwable, R]]

    Permalink

    Returns a pull with the result wrapped in Right, or an error wrapped in Left if the pull has failed.

  10. def covary[F2[x] >: F[x]]: Pull[F2, O, R]

    Permalink

    Lifts this pull to the specified effect type.

  11. def covaryAll[F2[x] >: F[x], O2 >: O, R2 >: R]: Pull[F2, O2, R2]

    Permalink

    Lifts this pull to the specified effect type, output type, and resource type.

  12. def covaryOutput[O2 >: O]: Pull[F, O2, R]

    Permalink

    Lifts this pull to the specified output type.

  13. def covaryResource[R2 >: R]: Pull[F, O, R2]

    Permalink

    Lifts this pull to the specified resource type.

  14. def ensuring(cond: (Pull[F, O, R]) ⇒ Boolean, msg: ⇒ Any): Pull[F, O, R]

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

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

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

    Permalink
    Implicit information
    This member is added by an implicit conversion from Pull[F, O, R] to Ensuring[Pull[F, O, R]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  18. def flatMap[F2[x] >: F[x], O2 >: O, R2](f: (R) ⇒ Pull[F2, O2, R2]): Pull[F2, O2, R2]

    Permalink

    Applies the resource of this pull to f and returns the result.

  19. def formatted(fmtstr: String): String

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

    Permalink
    Definition Classes
    AnyVal → Any
  21. def handleErrorWith[F2[x] >: F[x], O2 >: O, R2 >: R](h: (Throwable) ⇒ Pull[F2, O2, R2]): Pull[F2, O2, R2]

    Permalink

    If this terminates with Pull.raiseError(e), invoke h(e).

  22. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  23. def map[R2](f: (R) ⇒ R2): Pull[F, O, R2]

    Permalink

    Applies the resource of this pull to f and returns the result in a new Pull.

  24. def mapOutput[O2](f: (O) ⇒ O2): Pull[F, O2, R]

    Permalink

    Applies the outputs of this pull to f and returns the result in a new Pull.

  25. def onComplete[F2[x] >: F[x], O2 >: O, R2 >: R](p2: ⇒ Pull[F2, O2, R2]): Pull[F2, O2, R2]

    Permalink

    Run p2 after this, regardless of errors during this, then reraise any errors encountered during this.

  26. def stream(implicit ev: <:<[R, Unit]): Stream[F, O]

    Permalink

    Interpret this Pull to produce a Stream.

    Interpret this Pull to produce a Stream.

    May only be called on pulls which return a Unit result type. Use p.void.stream to explicitly ignore the result type of the pull.

  27. def toString(): String

    Permalink
    Definition Classes
    Any
  28. def void: Pull[F, O, Unit]

    Permalink

    Discards the result type of this pull.

  29. def [B](y: B): (Pull[F, O, R], B)

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

Inherited from AnyVal

Inherited from Any

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

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

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

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

Ungrouped