Packages

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

Allows acquiring elements from a stream in a resource safe way, emitting elements of type O, working with a resource of type R, and evaluating effects of type F.

Laws:

or forms a monoid in conjunction with done:

  • or(done, p) == p and or(p, done) == p.
  • or(or(p1,p2), p3) == or(p1, or(p2,p3))

fail is caught by onError:

  • onError(fail(e))(f) == f(e)

Pull forms a monad with pure and flatMap:

  • pure >=> f == f
  • f >=> pure == f
  • (f >=> g) >=> h == f >=> (g >=> h) where f >=> g is defined as a => a flatMap f flatMap g
Source
Pull.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Pull
  2. AnyRef
  3. Any
Implicitly
  1. by covaryPure
  2. by any2stringadd
  3. by StringFormat
  4. by Ensuring
  5. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String
    Implicit
    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)
    Implicit
    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
    Definition Classes
    AnyRef → Any
  6. def >>[F2[x] >: F[x], O2 >: O, R2](p2: ⇒ Pull[F2, O2, R2])(implicit S: RealSupertype[O, O2]): Pull[F2, O2, R2]

    Defined as p >> p2 == p flatMap { _ => p2 }.

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

    Definition: p as r == p map (_ => r).

  8. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  9. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. def close: Stream[F, O]

    Interpret this Pull to produce a Stream.

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

  11. implicit def covary[F2[_]](implicit S: Sub1[F, F2]): Pull[F2, O, R]

    Converts this pull to a pull of the specified subtype.

  12. def ensuring(cond: (Pull[F, O, R]) ⇒ Boolean, msg: ⇒ Any): Pull[F, O, R]
    Implicit
    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
  13. def ensuring(cond: (Pull[F, O, R]) ⇒ Boolean): Pull[F, O, R]
    Implicit
    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
  14. def ensuring(cond: Boolean, msg: ⇒ Any): Pull[F, O, R]
    Implicit
    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: Boolean): Pull[F, O, R]
    Implicit
    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. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  18. def filter(f: (R) ⇒ Boolean): Pull[F, O, R]

    If f returns true when passed the resource of this pull, this pull is returned.

    If f returns true when passed the resource of this pull, this pull is returned. Otherwise, Pull.done is returned.

  19. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  20. def flatMap[F2[x] >: F[x], O2 >: O, R2](f: (R) ⇒ Pull[F2, O2, R2]): Pull[F2, O2, R2]

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

  21. def formatted(fmtstr: String): String
    Implicit
    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()
  22. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  23. def hashCode(): Int
    Definition Classes
    AnyRef → Any
  24. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  25. def map[R2](f: (R) ⇒ R2): Pull[F, O, R2]

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

  26. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  27. final def notify(): Unit
    Definition Classes
    AnyRef
  28. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  29. def optional: Pull[F, O, Option[R]]

    Returns this pull's resource wrapped in Some or returns None if this pull fails due to an exhausted Handle.

  30. def or[F2[x] >: F[x], O2 >: O, R2 >: R](p2: ⇒ Pull[F2, O2, R2])(implicit S1: RealSupertype[O, O2], R2: RealSupertype[R, R2]): Pull[F2, O2, R2]

    Consult p2 if this pull fails due to an await on an exhausted Handle.

    Consult p2 if this pull fails due to an await on an exhausted Handle. If this pull fails due to an error, p2 is not consulted.

  31. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  32. def toString(): String
    Definition Classes
    Pull → AnyRef → Any
  33. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. def withFilter(f: (R) ⇒ Boolean): Pull[F, O, R]

    If f returns true when passed the resource of this pull, this pull is returned.

    If f returns true when passed the resource of this pull, this pull is returned. Otherwise, Pull.done is returned.

  37. def [B](y: B): (Pull[F, O, R], B)
    Implicit
    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 >>[F2[x] >: F[x], O2 >: O, R2](p2: ⇒ Pull[F2, O2, R2])(implicit S: RealSupertype[O, O2]): Pull[F2, O2, R2]

    Defined as p >> p2 == p flatMap { _ => p2 }.

    Defined as p >> p2 == p flatMap { _ => p2 }.

    Implicit
    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]).>>(p2)(S)
  2. def as[R2](r: R2): Pull[Nothing, O, R2]

    Definition: p as r == p map (_ => r).

    Definition: p as r == p map (_ => r).

    Implicit
    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(r)
  3. def close: Stream[Nothing, O]

    Interpret this Pull to produce a Stream.

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

    Implicit
    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]).close
  4. implicit def covary[F2[_]](implicit S: Sub1[Nothing, F2]): Pull[F2, O, R]

    Converts this pull to a pull of the specified subtype.

    Converts this pull to a pull of the specified subtype.

    Implicit
    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]).covary(S)
  5. def filter(f: (R) ⇒ Boolean): Pull[Nothing, O, R]

    If f returns true when passed the resource of this pull, this pull is returned.

    If f returns true when passed the resource of this pull, this pull is returned. Otherwise, Pull.done is returned.

    Implicit
    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]).filter(f)
  6. def flatMap[F2[x] >: F[x], O2 >: O, R2](f: (R) ⇒ Pull[F2, O2, R2]): Pull[F2, O2, R2]

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

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

    Implicit
    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]).flatMap(f)
  7. def map[R2](f: (R) ⇒ R2): Pull[Nothing, O, R2]

    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
    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)
  8. def optional: Pull[Nothing, O, Option[R]]

    Returns this pull's resource wrapped in Some or returns None if this pull fails due to an exhausted Handle.

    Returns this pull's resource wrapped in Some or returns None if this pull fails due to an exhausted Handle.

    Implicit
    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]).optional
  9. def or[F2[x] >: F[x], O2 >: O, R2 >: R](p2: ⇒ Pull[F2, O2, R2])(implicit S1: RealSupertype[O, O2], R2: RealSupertype[R, R2]): Pull[F2, O2, R2]

    Consult p2 if this pull fails due to an await on an exhausted Handle.

    Consult p2 if this pull fails due to an await on an exhausted Handle. If this pull fails due to an error, p2 is not consulted.

    Implicit
    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]).or(p2)(S1, R2)
  10. def toString(): String
    Implicit
    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]).toString()
    Definition Classes
    Pull → AnyRef → Any
  11. def withFilter(f: (R) ⇒ Boolean): Pull[Nothing, O, R]

    If f returns true when passed the resource of this pull, this pull is returned.

    If f returns true when passed the resource of this pull, this pull is returned. Otherwise, Pull.done is returned.

    Implicit
    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]).withFilter(f)

Inherited from AnyRef

Inherited from Any

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