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.

Much of the API of Pull is defined in Pull.InvariantOps.

Laws:

Pull forms a monad in R with pure and flatMap:

fail is caught by onError:

Source
Pull.scala
Linear Supertypes
AnyVal, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Pull
  2. AnyVal
  3. Any
Implicitly
  1. by PureOps
  2. by covaryPure
  3. by any2stringadd
  4. by StringFormat
  5. by Ensuring
  6. 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. This conversion will take place only if F is a subclass of Pure (F <: Pure).
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean

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

    Permalink
    Implicit information
    This member is added by an implicit conversion from Pull[F, O, R] to PureOps[O, R] performed by method PureOps in fs2.Pull. This conversion will take place only if F is a subclass of Pure (F <: Pure).
    Definition Classes
    PureOps
  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[F[_]]: Pull[F, O, R]

    Permalink
    Implicit information
    This member is added by an implicit conversion from Pull[F, O, R] to PureOps[O, R] performed by method PureOps in fs2.Pull. This conversion will take place only if F is a subclass of Pure (F <: Pure).
    Definition Classes
    PureOps
  11. def covaryAll[F[_], O2 >: O, R2 >: R]: Pull[F, O2, R2]

    Permalink
    Implicit information
    This member is added by an implicit conversion from Pull[F, O, R] to PureOps[O, R] performed by method PureOps in fs2.Pull. This conversion will take place only if F is a subclass of Pure (F <: Pure).
    Definition Classes
    PureOps
  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[F[_], O2 >: O, R2](f: (R) ⇒ Pull[F, O2, R2]): Pull[F, O2, R2]

    Permalink
    Implicit information
    This member is added by an implicit conversion from Pull[F, O, R] to PureOps[O, R] performed by method PureOps in fs2.Pull. This conversion will take place only if F is a subclass of Pure (F <: Pure).
    Definition Classes
    PureOps
  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. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  22. 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.

  23. def onComplete[F[_], O2 >: O, R2 >: R](p2: ⇒ Pull[F, O2, R2]): Pull[F, O2, R2]

    Permalink
    Implicit information
    This member is added by an implicit conversion from Pull[F, O, R] to PureOps[O, R] performed by method PureOps in fs2.Pull. This conversion will take place only if F is a subclass of Pure (F <: Pure).
    Definition Classes
    PureOps
  24. def onError[F[_], O2 >: O, R2 >: R](h: (Throwable) ⇒ Pull[F, O2, R2]): Pull[F, O2, R2]

    Permalink
    Implicit information
    This member is added by an implicit conversion from Pull[F, O, R] to PureOps[O, R] performed by method PureOps in fs2.Pull. This conversion will take place only if F is a subclass of Pure (F <: Pure).
    Definition Classes
    PureOps
  25. def scope[F[_]]: Pull[F, O, R]

    Permalink
    Implicit information
    This member is added by an implicit conversion from Pull[F, O, R] to PureOps[O, R] performed by method PureOps in fs2.Pull. This conversion will take place only if F is a subclass of Pure (F <: Pure).
    Definition Classes
    PureOps
  26. def stream: Stream[F, O]

    Permalink

    Interpret this Pull to produce a Stream.

    Interpret this Pull to produce a Stream. The result type R is discarded.

  27. def toString(): String

    Permalink
    Definition Classes
    Any
  28. 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. This conversion will take place only if F is a subclass of Pure (F <: Pure).
    Definition Classes
    ArrowAssoc

Shadowed Implicit Value Members

  1. def as[R2](r2: R2): Pull[Nothing, O, R2]

    Permalink

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

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

    Implicit information
    This member is added by an implicit conversion from Pull[F, O, R] to Pull[Nothing, O, R] performed by method covaryPure in fs2.Pull. This conversion will take place only if F is a subclass of Pure (F <: Pure).
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (pull: Pull[Nothing, O, R]).as(r2)
  2. def attempt: Pull[Nothing, 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.

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

    Implicit information
    This member is added by an implicit conversion from Pull[F, O, R] to Pull[Nothing, O, R] performed by method covaryPure in fs2.Pull. This conversion will take place only if F is a subclass of Pure (F <: Pure).
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (pull: Pull[Nothing, O, R]).attempt
  3. def covaryOutput[O2 >: O]: Pull[Nothing, O2, R]

    Permalink

    Lifts this pull to the specified output type.

    Lifts this pull to the specified output type.

    Implicit information
    This member is added by an implicit conversion from Pull[F, O, R] to Pull[Nothing, O, R] performed by method covaryPure in fs2.Pull. This conversion will take place only if F is a subclass of Pure (F <: Pure).
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (pull: Pull[Nothing, O, R]).covaryOutput
  4. def covaryResource[R2 >: R]: Pull[Nothing, O, R2]

    Permalink

    Lifts this pull to the specified resource type.

    Lifts this pull to the specified resource type.

    Implicit information
    This member is added by an implicit conversion from Pull[F, O, R] to Pull[Nothing, O, R] performed by method covaryPure in fs2.Pull. This conversion will take place only if F is a subclass of Pure (F <: Pure).
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (pull: Pull[Nothing, O, R]).covaryResource
  5. def map[R2](f: (R) ⇒ R2): Pull[Nothing, O, R2]

    Permalink

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

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

    Implicit information
    This member is added by an implicit conversion from Pull[F, O, R] to Pull[Nothing, O, R] performed by method covaryPure in fs2.Pull. This conversion will take place only if F is a subclass of Pure (F <: Pure).
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (pull: Pull[Nothing, O, R]).map(f)
  6. def stream: Stream[Nothing, O]

    Permalink

    Interpret this Pull to produce a Stream.

    Interpret this Pull to produce a Stream. The result type R is discarded.

    Implicit information
    This member is added by an implicit conversion from Pull[F, O, R] to Pull[Nothing, O, R] performed by method covaryPure in fs2.Pull. This conversion will take place only if F is a subclass of Pure (F <: Pure).
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (pull: Pull[Nothing, O, R]).stream

Inherited from AnyVal

Inherited from Any

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

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

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