package stream
- Alphabetic
- By Inheritance
- stream
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
- type Sink[+E, +A0, -A, +B] = ZSink[Any, E, A0, A, B]
- type Stream[+E, +A] = ZStream[Any, E, A]
- type StreamChunk[+E, +A] = ZStreamChunk[Any, E, A]
-
sealed
trait
Take[+E, +A] extends Product with Serializable
A
Take[E, A]represents a singletakefrom a queue modeling a stream of values.A
Take[E, A]represents a singletakefrom a queue modeling a stream of values. ATakemay be a failure causeCause[E], an element valueAor an end-of-stream marker. -
trait
ZSink[-R, +E, +A0, -A, +B] extends AnyRef
A
Sink[E, A0, A, B]consumes values of typeA, ultimately producing either an error of typeE, or a value of typeBtogether with a remainder of typeA0.A
Sink[E, A0, A, B]consumes values of typeA, ultimately producing either an error of typeE, or a value of typeBtogether with a remainder of typeA0.Sinks form monads and combine in the usual ways.
- trait ZSinkPlatformSpecific extends AnyRef
-
class
ZStream[-R, +E, +A] extends Serializable
A
Stream[E, A]represents an effectful stream that can produce values of typeA, or potentially fail with a value of typeE.A
Stream[E, A]represents an effectful stream that can produce values of typeA, or potentially fail with a value of typeE.Streams have a very similar API to Scala collections, making them immediately familiar to most developers. Unlike Scala collections, streams can be used on effectful streams of data, such as HTTP connections, files, and so forth.
Streams do not leak resources. This guarantee holds in the presence of early termination (not all of a stream is consumed), failure, or even interruption.
Thanks to only first-order types, appropriate variance annotations, and specialized effect type (ZIO), streams feature extremely good type inference and should almost never require specification of any type parameters.
processis a low-level consumption method, usually used for creating combinators and constructors. For most usage, ZStream#fold, ZStream#foreach or ZStream#run should be preferred.The contract for the returned
Pullis as follows: - It must not be evaluted concurrently from multiple fibers - it is (usually) not thread-safe; - If an evaluation of thePullis interrupted, it is not safe to evaluate it again - it is (usually) not interruption-safe; - Once thePullhas failed with aNone, it is not safe to evaluate it again.The managed
Pullcan be used to read from the stream until it is empty (or possibly forever, if the stream is infinite). The providedPullis valid only inside the scope of the managed resource. -
class
ZStreamChunk[-R, +E, +A] extends AnyRef
A
ZStreamChunk[R, E, A]represents an effectful stream that can produce values of typeA, or potentially fail with a value of typeE.A
ZStreamChunk[R, E, A]represents an effectful stream that can produce values of typeA, or potentially fail with a value of typeE.ZStreamChunkdiffers fromZStreamin that elements in the stream are processed in batches, which is orders of magnitude more efficient than dealing with each element individually.ZStreamChunkis particularly suited for situations where you are dealing with values of primitive types, e.g. those coming off ajava.io.InputStream - trait ZStreamPlatformSpecific extends AnyRef
Value Members
- val StreamChunk: ZStreamChunk.type
-
object
BuildInfo extends Product with Serializable
This object was generated by sbt-buildinfo.
- object Sink
- object Stream
- object Take extends Serializable
- object ZSink extends ZSinkPlatformSpecific
- object ZStream extends Serializable
- object ZStreamChunk