Class/Object

fs2

Handle

Related Docs: object Handle | package fs2

Permalink

final class Handle[+F[_], +A] extends AnyRef

A currently open Stream[F,A] which allows chunks to be pulled or pushed.

To get a handle from a stream, use Stream.open.

Source
Handle.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Handle
  2. AnyRef
  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
    AnyRef → Any
  2. final def ##(): Int

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

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

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

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

    Permalink
    Definition Classes
    Any
  7. def await: Pull[F, Nothing, (NonEmptyChunk[A], Handle[F, A])]

    Permalink

    Waits for a chunk of elements to be available in the source stream.

    Waits for a chunk of elements to be available in the source stream. The chunk of elements along with a new handle are provided as the resource of the returned pull. The new handle can be used for subsequent operations, like awaiting again.

  8. def await1: Pull[F, Nothing, (A, Handle[F, A])]

    Permalink

    Like await but waits for a single element instead of an entire chunk.

  9. def await1Async[F2[_], A2 >: A](implicit S: Sub1[F, F2], F2: Async[F2], A2: RealSupertype[A, A2]): Pull[F2, Nothing, AsyncStep1[F2, A2]]

    Permalink

    Like awaitAsync but waits for a single element instead of an entire chunk.

  10. def await1Option: Pull[F, Nothing, Option[(A, Handle[F, A])]]

    Permalink

    Awaits the next available element from the input, or None if the input is exhausted.

  11. def awaitAsync[F2[_], A2 >: A](implicit S: Sub1[F, F2], F2: Async[F2], A2: RealSupertype[A, A2]): Pull[F2, Nothing, AsyncStep[F2, A2]]

    Permalink

    Asynchronously awaits for a chunk of elements to be available in the source stream.

    Asynchronously awaits for a chunk of elements to be available in the source stream. An async step is returned as the resource of the returned pull. The async step is a ScopedFuture, which can be raced with another scoped future or forced via ScopedFuture#pull.

  12. def awaitLimit(maxChunkSize: Int): Pull[F, Nothing, (NonEmptyChunk[A], Handle[F, A])]

    Permalink

    Like await, but returns a NonEmptyChunk of no more than maxChunkSize elements.

  13. def awaitN(n: Int, allowFewer: Boolean = false): Pull[F, Nothing, (List[NonEmptyChunk[A]], Handle[F, A])]

    Permalink

    Returns a List[NonEmptyChunk[A]] from the input whose combined size has a maximum value n.

  14. def awaitOption: Pull[F, Nothing, Option[(NonEmptyChunk[A], Handle[F, A])]]

    Permalink

    Awaits the next available chunk from the input, or None if the input is exhausted.

  15. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  16. def copy: Pull[F, A, Handle[F, A]]

    Permalink

    Copies the next available chunk to the output.

  17. def copy1: Pull[F, A, Handle[F, A]]

    Permalink

    Copies the next available element to the output.

  18. implicit def covary[F2[_]](implicit S: Sub1[F, F2]): Handle[F2, A]

    Permalink

    Converts this handle to a handle of the specified subtype.

  19. def drop(n: Long): Pull[F, Nothing, Handle[F, A]]

    Permalink

    Drops the first n elements of this Handle, and returns the new Handle.

  20. def dropWhile(p: (A) ⇒ Boolean): Pull[F, Nothing, Handle[F, A]]

    Permalink

    Drops elements of the this Handle until the predicate p fails, and returns the new Handle.

    Drops elements of the this Handle until the predicate p fails, and returns the new Handle. If non-empty, the first element of the returned Handle will fail p.

  21. def echo: Pull[F, A, Nothing]

    Permalink

    Writes all inputs to the output of the returned Pull.

  22. def echo1: Pull[F, A, Handle[F, A]]

    Permalink

    Reads a single element from the input and emits it to the output.

    Reads a single element from the input and emits it to the output. Returns the new Handle.

  23. def echoChunk: Pull[F, A, Handle[F, A]]

    Permalink

    Reads the next available chunk from the input and emits it to the output.

    Reads the next available chunk from the input and emits it to the output. Returns the new Handle.

  24. def ensuring(cond: (Handle[F, A]) ⇒ Boolean, msg: ⇒ Any): Handle[F, A]

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

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

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

    Permalink
    Implicit information
    This member is added by an implicit conversion from Handle[F, A] to Ensuring[Handle[F, A]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  28. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  29. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  30. def fetchN(n: Int): Pull[F, Nothing, Handle[F, A]]

    Permalink

    Like awaitN, but leaves the buffered input unconsumed.

  31. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  32. def find(f: (A) ⇒ Boolean): Pull[F, Nothing, (A, Handle[F, A])]

    Permalink

    Awaits the next available element where the predicate returns true.

  33. def fold[B](z: B)(f: (B, A) ⇒ B): Pull[F, Nothing, B]

    Permalink

    Folds all inputs using an initial value z and supplied binary operator, and writes the final result to the output of the supplied Pull when the stream has no more values.

  34. def fold1[A2 >: A](f: (A2, A2) ⇒ A2): Pull[F, Nothing, A2]

    Permalink

    Folds all inputs using the supplied binary operator, and writes the final result to the output of the supplied Pull when the stream has no more values.

  35. def forall(p: (A) ⇒ Boolean): Pull[F, Nothing, Boolean]

    Permalink

    Writes a single true value if all input matches the predicate, false otherwise.

  36. def formatted(fmtstr: String): String

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

    Permalink
    Definition Classes
    AnyRef → Any
  38. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  39. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  40. def last: Pull[F, Nothing, Option[A]]

    Permalink

    Returns the last element of the input, if non-empty.

  41. def map[A2](f: (A) ⇒ A2): Handle[F, A2]

    Permalink

    Applies f to each element from the source stream, yielding a new handle with a potentially different element type.

  42. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  43. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  44. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  45. def peek: Pull[F, Nothing, (Chunk[A], Handle[F, A])]

    Permalink

    Like await but does not consume the chunk (i.e., the chunk is pushed back).

  46. def peek1: Pull[F, Nothing, (A, Handle[F, A])]

    Permalink

    Like await1 but does not consume the element (i.e., the element is pushed back).

  47. def prefetch[F2[_]](implicit sub: Sub1[F, F2], F: Async[F2]): Pull[F2, Nothing, Pull[F2, Nothing, Handle[F2, A]]]

    Permalink

    Like await, but runs the await asynchronously.

    Like await, but runs the await asynchronously. A flatMap into inner Pull logically blocks until this await completes.

  48. def push[A2 >: A](c: Chunk[A2])(implicit A2: RealSupertype[A, A2]): Handle[F, A2]

    Permalink

    Returns a new handle with the specified chunk prepended to elements from the source stream.

  49. def push1[A2 >: A](a: A2)(implicit A2: RealSupertype[A, A2]): Handle[F, A2]

    Permalink

    Like push but for a single element instead of a chunk.

  50. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  51. def take(n: Long): Pull[F, A, Handle[F, A]]

    Permalink

    Emits the first n elements of the input and return the new Handle.

  52. def takeRight(n: Long): Pull[F, Nothing, Vector[A]]

    Permalink

    Emits the last n elements of the input.

  53. def takeThrough(p: (A) ⇒ Boolean): Pull[F, A, Handle[F, A]]

    Permalink

    Like takeWhile, but emits the first value which tests false.

  54. def takeWhile(p: (A) ⇒ Boolean): Pull[F, A, Handle[F, A]]

    Permalink

    Emits the elements of this Handle until the predicate p fails, and returns the new Handle.

    Emits the elements of this Handle until the predicate p fails, and returns the new Handle. If non-empty, the returned Handle will have a first element i for which p(i) is false.

  55. def toString(): String

    Permalink
    Definition Classes
    Handle → AnyRef → Any
  56. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  57. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  58. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  59. def [B](y: B): (Handle[F, A], B)

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

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from Handle[F, A] to any2stringadd[Handle[F, A]]

Inherited by implicit conversion StringFormat from Handle[F, A] to StringFormat[Handle[F, A]]

Inherited by implicit conversion Ensuring from Handle[F, A] to Ensuring[Handle[F, A]]

Inherited by implicit conversion ArrowAssoc from Handle[F, A] to ArrowAssoc[Handle[F, A]]

Ungrouped