ZStream

zio.stream.ZStream$
See theZStream companion class
object ZStream

Attributes

Companion:
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
ZStream.type

Members list

Concise view

Type members

Classlikes

trait Emit[+R, -E, -A, +B] extends ZIO[R, Option[E], Chunk[A]] => B

An Emit[R, E, A, B] represents an asynchronous callback that can be called multiple times. The callback can be called with a value of type ZIO[R, Option[E], Chunk[A]], where succeeding with a Chunk[A] indicates to emit those elements, failing with Some[E] indicates to terminate with that error, and failing with None indicates to terminate with an end of stream signal.

An Emit[R, E, A, B] represents an asynchronous callback that can be called multiple times. The callback can be called with a value of type ZIO[R, Option[E], Chunk[A]], where succeeding with a Chunk[A] indicates to emit those elements, failing with Some[E] indicates to terminate with that error, and failing with None indicates to terminate with an end of stream signal.

Attributes

Graph
Supertypes
trait ZIO[R, Option[E], Chunk[A]] => B
class Object
trait Matchable
class Any
final class EnvironmentWithPartiallyApplied[R](dummy: Boolean) extends AnyVal

Attributes

Graph
Supertypes
class AnyVal
trait Matchable
class Any
final class EnvironmentWithStreamPartiallyApplied[R](dummy: Boolean) extends AnyVal

Attributes

Graph
Supertypes
class AnyVal
trait Matchable
class Any
final class EnvironmentWithZIOPartiallyApplied[R](dummy: Boolean) extends AnyVal

Attributes

Graph
Supertypes
class AnyVal
trait Matchable
class Any
sealed trait GroupBy[-R, +E, +K, +V]

Representation of a grouped stream. This allows to filter which groups will be processed. Once this is applied all groups will be processed in parallel and the results will be merged in arbitrary order.

Representation of a grouped stream. This allows to filter which groups will be processed. Once this is applied all groups will be processed in parallel and the results will be merged in arbitrary order.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
GroupBy[R, E, K, V]

Attributes

Companion:
trait
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
sealed trait HaltStrategy

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Both.type
object Either.type
object Left.type
object Right.type
final class ProvideSomeLayer[R0, -R, +E, +A](self: ZStream[R, E, A]) extends AnyVal

Attributes

Graph
Supertypes
class AnyVal
trait Matchable
class Any
final implicit class RefineToOrDieOps[R, E <: Throwable, A](self: ZStream[R, E, A]) extends AnyVal

Attributes

Graph
Supertypes
class AnyVal
trait Matchable
class Any
final class ScopedPartiallyApplied[R](dummy: Boolean) extends AnyVal

Attributes

Graph
Supertypes
class AnyVal
trait Matchable
class Any
final class ServiceAtPartiallyApplied[Service](dummy: Boolean) extends AnyVal

Attributes

Graph
Supertypes
class AnyVal
trait Matchable
class Any
final class ServiceWithPartiallyApplied[Service](dummy: Boolean) extends AnyVal

Attributes

Graph
Supertypes
class AnyVal
trait Matchable
class Any
final class ServiceWithStreamPartiallyApplied[Service](dummy: Boolean) extends AnyVal

Attributes

Graph
Supertypes
class AnyVal
trait Matchable
class Any
final class ServiceWithZIOPartiallyApplied[Service](dummy: Boolean) extends AnyVal

Attributes

Graph
Supertypes
class AnyVal
trait Matchable
class Any
final implicit class SortedByKey[R, E, K, A](self: ZStream[R, E, (K, A)])

Provides extension methods for streams that are sorted by distinct keys.

Provides extension methods for streams that are sorted by distinct keys.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
final implicit class SyntaxOps[-R, +E, O](self: ZStream[R, E, O])

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
final class UnwrapScopedPartiallyApplied[R](dummy: Boolean) extends AnyVal

Attributes

Graph
Supertypes
class AnyVal
trait Matchable
class Any
final class UpdateService[-R, +E, +A, M](self: ZStream[R, E, A]) extends AnyVal

Attributes

Graph
Supertypes
class AnyVal
trait Matchable
class Any
final class UpdateServiceAt[-R, +E, +A, Service](self: ZStream[R, E, A]) extends AnyVal

Attributes

Graph
Supertypes
class AnyVal
trait Matchable
class Any
final class WhenCaseZIO[R, E, A](a: () => ZIO[R, E, A]) extends AnyVal

Attributes

Graph
Supertypes
class AnyVal
trait Matchable
class Any
final class WhenZIO[R, E](b: () => ZIO[R, E, Boolean]) extends AnyVal

Attributes

Graph
Supertypes
class AnyVal
trait Matchable
class Any

Attributes

Companion:
trait
Graph
Supertypes
Self type
trait ZStreamConstructor[Input]

A ZStreamConstructor[Input] knows how to construct a ZStream value from an input of type Input. This allows the type of the ZStream value constructed to depend on Input.

A ZStreamConstructor[Input] knows how to construct a ZStream value from an input of type Input. This allows the type of the ZStream value constructed to depend on Input.

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any

Attributes

Graph
Supertypes
Known subtypes

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Inherited classlikes

final class Connection

Accepted connection made to a specific channel AsynchronousServerSocketChannel

Accepted connection made to a specific channel AsynchronousServerSocketChannel

Attributes

Inherited from:
ZStreamPlatformSpecificConstructors (hidden)
Graph
Supertypes
class Object
trait Matchable
class Any
object Connection

Attributes

Inherited from:
ZStreamPlatformSpecificConstructors (hidden)
Graph
Supertypes
class Object
trait Matchable
class Any

Attributes

Inherited from:
ZStreamPlatformSpecificConstructors (hidden)
Graph
Supertypes
Known subtypes
object ZStreamConstructor.type

Types

type Pull[-R, +E, +A] = ZIO[R, Option[E], Chunk[A]]

Value members

Concrete methods

def absolve[R, E, O](xs: ZStream[R, E, Either[E, O]])(implicit trace: Trace): ZStream[R, E, O]

Submerges the error case of an Either into the ZStream.

Submerges the error case of an Either into the ZStream.

Attributes

def acquireReleaseExitWith[R, E, A](acquire: => ZIO[R, E, A])(release: (A, Exit[Any, Any]) => URIO[R, Any])(implicit trace: Trace): ZStream[R, E, A]

Creates a stream from a single value that will get cleaned up after the stream is consumed

Creates a stream from a single value that will get cleaned up after the stream is consumed

Attributes

def acquireReleaseWith[R, E, A](acquire: => ZIO[R, E, A])(release: A => URIO[R, Any])(implicit trace: Trace): ZStream[R, E, A]

Creates a stream from a single value that will get cleaned up after the stream is consumed

Creates a stream from a single value that will get cleaned up after the stream is consumed

Attributes

def alphanumeric(implicit trace: Trace): ZStream[Any, Nothing, Char]

An infinite stream of random alphanumeric characters.

An infinite stream of random alphanumeric characters.

Attributes

def apply[A](as: A*)(implicit trace: Trace): ZStream[Any, Nothing, A]

Creates a pure stream from a variable list of values

Creates a pure stream from a variable list of values

Attributes

def blocking[R, E, A](stream: => ZStream[R, E, A])(implicit trace: Trace): ZStream[R, E, A]

Locks the execution of the specified stream to the blocking executor. Any streams that are composed after this one will automatically be shifted back to the previous executor.

Locks the execution of the specified stream to the blocking executor. Any streams that are composed after this one will automatically be shifted back to the previous executor.

Attributes

def concatAll[R, E, O](streams: => Chunk[ZStream[R, E, O]])(implicit trace: Trace): ZStream[R, E, O]

Concatenates all of the streams in the chunk to one stream.

Concatenates all of the streams in the chunk to one stream.

Attributes

def debug(value: => Any)(implicit trace: Trace): ZStream[Any, Nothing, Unit]

Prints the specified message to the console for debugging purposes.

Prints the specified message to the console for debugging purposes.

Attributes

def die(ex: => Throwable)(implicit trace: Trace): ZStream[Any, Nothing, Nothing]

The stream that dies with the ex.

The stream that dies with the ex.

Attributes

def dieMessage(msg: => String)(implicit trace: Trace): ZStream[Any, Nothing, Nothing]

The stream that dies with an exception described by msg.

The stream that dies with an exception described by msg.

Attributes

def done[E, A](exit: => Exit[E, A])(implicit trace: Trace): ZStream[Any, E, A]

The stream that ends with the zio.Exit value exit.

The stream that ends with the zio.Exit value exit.

Attributes

def empty(implicit trace: Trace): ZStream[Any, Nothing, Nothing]

The empty stream

The empty stream

Attributes

def environment[R](implicit trace: Trace): ZStream[R, Nothing, ZEnvironment[R]]

Accesses the whole environment of the stream.

Accesses the whole environment of the stream.

Attributes

Accesses the environment of the stream.

Accesses the environment of the stream.

Attributes

Accesses the environment of the stream in the context of a stream.

Accesses the environment of the stream in the context of a stream.

Attributes

Accesses the environment of the stream in the context of an effect.

Accesses the environment of the stream in the context of an effect.

Attributes

def execute[R, E](zio: => ZIO[R, E, Any])(implicit trace: Trace): ZStream[R, E, Nothing]

Creates a stream that executes the specified effect but emits no elements.

Creates a stream that executes the specified effect but emits no elements.

Attributes

def fail[E](error: => E)(implicit trace: Trace): ZStream[Any, E, Nothing]

The stream that always fails with the error

The stream that always fails with the error

Attributes

def failCause[E](cause: => Cause[E])(implicit trace: Trace): ZStream[Any, E, Nothing]

The stream that always fails with cause.

The stream that always fails with cause.

Attributes

def finalizer[R](finalizer: => URIO[R, Any])(implicit trace: Trace): ZStream[R, Nothing, Any]

Creates a one-element stream that never fails and executes the finalizer when it ends.

Creates a one-element stream that never fails and executes the finalizer when it ends.

Attributes

def from[Input](input: => Input)(implicit constructor: ZStreamConstructor[Input], trace: Trace): Out
def fromChannel[R, E, A](channel: ZChannel[R, Any, Any, Any, E, Chunk[A], Any]): ZStream[R, E, A]

Creates a stream from a zio.stream.ZChannel

Creates a stream from a zio.stream.ZChannel

Attributes

def fromChunk[O](chunk: => Chunk[O])(implicit trace: Trace): ZStream[Any, Nothing, O]

Creates a stream from a zio.Chunk of values

Creates a stream from a zio.Chunk of values

Attributes

c

a chunk of values

Returns:

a finite stream of values

def fromChunkHub[O](hub: => Hub[Chunk[O]])(implicit trace: Trace): ZStream[Any, Nothing, O]

Creates a stream from a subscription to a hub.

Creates a stream from a subscription to a hub.

Attributes

def fromChunkHubScoped[O](hub: => Hub[Chunk[O]])(implicit trace: Trace): ZIO[Scope, Nothing, ZStream[Any, Nothing, O]]

Creates a stream from a subscription to a hub in the context of a scoped effect. The scoped effect describes subscribing to receive messages from the hub while the stream describes taking messages from the hub.

Creates a stream from a subscription to a hub in the context of a scoped effect. The scoped effect describes subscribing to receive messages from the hub while the stream describes taking messages from the hub.

Attributes

def fromChunkHubScopedWithShutdown[O](hub: => Hub[Chunk[O]])(implicit trace: Trace): ZIO[Scope, Nothing, ZStream[Any, Nothing, O]]

Creates a stream from a subscription to a hub in the context of a scoped effect. The scoped effect describes subscribing to receive messages from the hub while the stream describes taking messages from the hub.

Creates a stream from a subscription to a hub in the context of a scoped effect. The scoped effect describes subscribing to receive messages from the hub while the stream describes taking messages from the hub.

The hub will be shut down once the stream is closed.

Attributes

def fromChunkHubWithShutdown[O](hub: => Hub[Chunk[O]])(implicit trace: Trace): ZStream[Any, Nothing, O]

Creates a stream from a subscription to a hub.

Creates a stream from a subscription to a hub.

The hub will be shut down once the stream is closed.

Attributes

def fromChunkQueue[O](queue: => Dequeue[Chunk[O]])(implicit trace: Trace): ZStream[Any, Nothing, O]

Creates a stream from a queue of values

Creates a stream from a queue of values

Attributes

def fromChunkQueueWithShutdown[O](queue: => Dequeue[Chunk[O]])(implicit trace: Trace): ZStream[Any, Nothing, O]

Creates a stream from a queue of values. The queue will be shutdown once the stream is closed.

Creates a stream from a queue of values. The queue will be shutdown once the stream is closed.

Attributes

def fromChunks[O](cs: Chunk[O]*)(implicit trace: Trace): ZStream[Any, Nothing, O]

Creates a stream from an arbitrary number of chunks.

Creates a stream from an arbitrary number of chunks.

Attributes

def fromHub[A](hub: => Hub[A], maxChunkSize: => Int)(implicit trace: Trace): ZStream[Any, Nothing, A]

Creates a stream from a subscription to a hub.

Creates a stream from a subscription to a hub.

Attributes

def fromHubScoped[A](hub: => Hub[A], maxChunkSize: => Int)(implicit trace: Trace): ZIO[Scope, Nothing, ZStream[Any, Nothing, A]]

Creates a stream from a subscription to a hub in the context of a scoped effect. The scoped effect describes subscribing to receive messages from the hub while the stream describes taking messages from the hub.

Creates a stream from a subscription to a hub in the context of a scoped effect. The scoped effect describes subscribing to receive messages from the hub while the stream describes taking messages from the hub.

Attributes

def fromHubScopedWithShutdown[A](hub: => Hub[A], maxChunkSize: => Int)(implicit trace: Trace): ZIO[Scope, Nothing, ZStream[Any, Nothing, A]]

Creates a stream from a subscription to a hub in the context of a scoped effect. The scoped effect describes subscribing to receive messages from the hub while the stream describes taking messages from the hub.

Creates a stream from a subscription to a hub in the context of a scoped effect. The scoped effect describes subscribing to receive messages from the hub while the stream describes taking messages from the hub.

The hub will be shut down once the stream is closed.

Attributes

def fromHubWithShutdown[A](hub: => Hub[A], maxChunkSize: => Int)(implicit trace: Trace): ZStream[Any, Nothing, A]

Creates a stream from a subscription to a hub.

Creates a stream from a subscription to a hub.

The hub will be shut down once the stream is closed.

Attributes

def fromInputStream(is: => InputStream, chunkSize: => Int)(implicit trace: Trace): ZStream[Any, IOException, Byte]

Creates a stream from a java.io.InputStream

Creates a stream from a java.io.InputStream

Attributes

def fromInputStreamScoped[R](is: => ZIO[Scope & R, IOException, InputStream], chunkSize: => Int)(implicit trace: Trace): ZStream[R, IOException, Byte]

Creates a stream from a scoped java.io.InputStream value.

Creates a stream from a scoped java.io.InputStream value.

Attributes

def fromInputStreamZIO[R](is: => ZIO[R, IOException, InputStream], chunkSize: => Int)(implicit trace: Trace): ZStream[R, IOException, Byte]

Creates a stream from a java.io.InputStream. Ensures that the input stream is closed after it is exhausted.

Creates a stream from a java.io.InputStream. Ensures that the input stream is closed after it is exhausted.

Attributes

def fromIterable[O](as: => Iterable[O])(implicit trace: Trace): ZStream[Any, Nothing, O]

Creates a stream from an iterable collection of values

Creates a stream from an iterable collection of values

Attributes

def fromIterable[O](as: => Iterable[O], chunkSize: => Int)(implicit trace: Trace): ZStream[Any, Nothing, O]

Creates a stream from an iterable collection of values

Creates a stream from an iterable collection of values

Attributes

def fromIterableZIO[R, E, O](iterable: => ZIO[R, E, Iterable[O]])(implicit trace: Trace): ZStream[R, E, O]

Creates a stream from an effect producing a value of type Iterable[A]

Creates a stream from an effect producing a value of type Iterable[A]

Attributes

def fromIterableZIO[R, E, O](iterable: => ZIO[R, E, Iterable[O]], chunkSize: => Int)(implicit trace: Trace): ZStream[R, E, O]

Creates a stream from an effect producing a value of type Iterable[A]

Creates a stream from an effect producing a value of type Iterable[A]

Attributes

def fromIterator[A](iterator: => Iterator[A], maxChunkSize: => Int)(implicit trace: Trace): ZStream[Any, Throwable, A]

Creates a stream from an iterator

Creates a stream from an iterator

Attributes

def fromIteratorScoped[R, A](iterator: => ZIO[Scope & R, Throwable, Iterator[A]], maxChunkSize: => Int)(implicit trace: Trace): ZStream[R, Throwable, A]

Creates a stream from a scoped iterator

Creates a stream from a scoped iterator

Attributes

def fromIteratorSucceed[A](iterator: => Iterator[A], maxChunkSize: => Int)(implicit trace: Trace): ZStream[Any, Nothing, A]

Creates a stream from an iterator

Creates a stream from an iterator

Attributes

def fromIteratorZIO[R, A](iterator: => ZIO[R, Throwable, Iterator[A]])(implicit trace: Trace): ZStream[R, Throwable, A]

Creates a stream from an iterator that may potentially throw exceptions

Creates a stream from an iterator that may potentially throw exceptions

Attributes

def fromIteratorZIO[R, A](iterator: => ZIO[R, Throwable, Iterator[A]], chunkSize: Int)(implicit trace: Trace): ZStream[R, Throwable, A]

Creates a stream from an iterator that may potentially throw exceptions

Creates a stream from an iterator that may potentially throw exceptions

Attributes

def fromJavaIterator[A](iterator: => Iterator[A])(implicit trace: Trace): ZStream[Any, Throwable, A]

Creates a stream from a Java iterator that may throw exceptions

Creates a stream from a Java iterator that may throw exceptions

Attributes

def fromJavaIterator[A](iterator: => Iterator[A], chunkSize: Int)(implicit trace: Trace): ZStream[Any, Throwable, A]

Creates a stream from a Java iterator that may throw exceptions

Creates a stream from a Java iterator that may throw exceptions

Attributes

def fromJavaIteratorScoped[R, A](iterator: => ZIO[Scope & R, Throwable, Iterator[A]])(implicit trace: Trace): ZStream[R, Throwable, A]

Creates a stream from a scoped iterator

Creates a stream from a scoped iterator

Attributes

def fromJavaIteratorScoped[R, A](iterator: => ZIO[Scope & R, Throwable, Iterator[A]], chunkSize: Int)(implicit trace: Trace): ZStream[R, Throwable, A]

Creates a stream from a scoped iterator

Creates a stream from a scoped iterator

Attributes

def fromJavaIteratorSucceed[A](iterator: => Iterator[A])(implicit trace: Trace): ZStream[Any, Nothing, A]

Creates a stream from a Java iterator

Creates a stream from a Java iterator

Attributes

def fromJavaIteratorSucceed[A](iterator: => Iterator[A], chunkSize: Int)(implicit trace: Trace): ZStream[Any, Nothing, A]

Creates a stream from a Java iterator

Creates a stream from a Java iterator

Attributes

def fromJavaIteratorZIO[R, A](iterator: => ZIO[R, Throwable, Iterator[A]])(implicit trace: Trace): ZStream[R, Throwable, A]

Creates a stream from a Java iterator that may potentially throw exceptions

Creates a stream from a Java iterator that may potentially throw exceptions

Attributes

def fromJavaIteratorZIO[R, A](iterator: => ZIO[R, Throwable, Iterator[A]], chunkSize: Int)(implicit trace: Trace): ZStream[R, Throwable, A]

Creates a stream from a Java iterator that may potentially throw exceptions

Creates a stream from a Java iterator that may potentially throw exceptions

Attributes

def fromPull[R, E, A](zio: ZIO[Scope & R, Nothing, ZIO[R, Option[E], Chunk[A]]])(implicit trace: Trace): ZStream[R, E, A]

Creates a stream from a ZIO effect that pulls elements from another stream. See toPull for reference

Creates a stream from a ZIO effect that pulls elements from another stream. See toPull for reference

Attributes

def fromQueue[O](queue: => Dequeue[O], maxChunkSize: => Int)(implicit trace: Trace): ZStream[Any, Nothing, O]

Creates a stream from a queue of values

Creates a stream from a queue of values

Attributes

maxChunkSize

Maximum number of queued elements to put in one chunk in the stream

def fromQueueWithShutdown[O](queue: => Dequeue[O], maxChunkSize: => Int)(implicit trace: Trace): ZStream[Any, Nothing, O]

Creates a stream from a queue of values. The queue will be shutdown once the stream is closed.

Creates a stream from a queue of values. The queue will be shutdown once the stream is closed.

Attributes

maxChunkSize

Maximum number of queued elements to put in one chunk in the stream

def fromSchedule[R, A](schedule: => Schedule[R, Any, A])(implicit trace: Trace): ZStream[R, Nothing, A]

Creates a stream from a zio.Schedule that does not require any further input. The stream will emit an element for each value output from the schedule, continuing for as long as the schedule continues.

Creates a stream from a zio.Schedule that does not require any further input. The stream will emit an element for each value output from the schedule, continuing for as long as the schedule continues.

Attributes

def fromTQueue[A](queue: => TDequeue[A])(implicit trace: Trace): ZStream[Any, Nothing, A]

Creates a stream from a zio.stm.TQueue of values.

Creates a stream from a zio.stm.TQueue of values.

Attributes

def fromZIO[R, E, A](fa: => ZIO[R, E, A])(implicit trace: Trace): ZStream[R, E, A]

Creates a stream from an effect producing a value of type A

Creates a stream from an effect producing a value of type A

Attributes

def fromZIOOption[R, E, A](fa: => ZIO[R, Option[E], A])(implicit trace: Trace): ZStream[R, E, A]

Creates a stream from an effect producing a value of type A or an empty Stream

Creates a stream from an effect producing a value of type A or an empty Stream

Attributes

def iterate[A](a: => A)(f: A => A)(implicit trace: Trace): ZStream[Any, Nothing, A]

The infinite stream of iterative function application: a, f(a), f(f(a)), f(f(f(a))), ...

The infinite stream of iterative function application: a, f(a), f(f(a)), f(f(f(a))), ...

Attributes

def log(message: => String)(implicit trace: Trace): ZStream[Any, Nothing, Unit]

Logs the specified message at the current log level.

Logs the specified message at the current log level.

Attributes

def logAnnotate(key: => String, value: => String)(implicit trace: Trace): ZStream[Any, Nothing, Unit]

Annotates each log in streams composed after this with the specified log annotation.

Annotates each log in streams composed after this with the specified log annotation.

Attributes

def logAnnotate(annotation: => LogAnnotation, annotations: LogAnnotation*)(implicit trace: Trace): ZStream[Any, Nothing, Unit]

Annotates each log in streams composed after this with the specified log annotation.

Annotates each log in streams composed after this with the specified log annotation.

Attributes

def logAnnotate(annotations: => Set[LogAnnotation])(implicit trace: Trace): ZStream[Any, Nothing, Unit]

Annotates each log in streams composed after this with the specified log annotation.

Annotates each log in streams composed after this with the specified log annotation.

Attributes

def logAnnotations(implicit trace: Trace): ZStream[Any, Nothing, Map[String, String]]

Retrieves the log annotations associated with the current scope.

Retrieves the log annotations associated with the current scope.

Attributes

def logDebug(message: => String)(implicit trace: Trace): ZStream[Any, Nothing, Unit]

Logs the specified message at the debug log level.

Logs the specified message at the debug log level.

Attributes

def logError(message: => String)(implicit trace: Trace): ZStream[Any, Nothing, Unit]

Logs the specified message at the error log level.

Logs the specified message at the error log level.

Attributes

def logErrorCause(cause: => Cause[Any])(implicit trace: Trace): ZStream[Any, Nothing, Unit]

Logs the specified cause as an error.

Logs the specified cause as an error.

Attributes

def logFatal(message: => String)(implicit trace: Trace): ZStream[Any, Nothing, Unit]

Logs the specified message at the fatal log level.

Logs the specified message at the fatal log level.

Attributes

def logInfo(message: => String)(implicit trace: Trace): ZStream[Any, Nothing, Unit]

Logs the specified message at the informational log level.

Logs the specified message at the informational log level.

Attributes

def logLevel(level: LogLevel)(implicit trace: Trace): ZStream[Any, Nothing, Unit]

Sets the log level for streams composed after this.

Sets the log level for streams composed after this.

Attributes

def logSpan(label: => String)(implicit trace: Trace): ZStream[Any, Nothing, Unit]

Adjusts the label for the logging span for streams composed after this.

Adjusts the label for the logging span for streams composed after this.

Attributes

def logTrace(message: => String)(implicit trace: Trace): ZStream[Any, Nothing, Unit]

Logs the specified message at the trace log level.

Logs the specified message at the trace log level.

Attributes

def logWarning(message: => String)(implicit trace: Trace): ZStream[Any, Nothing, Unit]

Logs the specified message at the warning log level.

Logs the specified message at the warning log level.

Attributes

def mergeAll[R, E, O](n: => Int, outputBuffer: => Int)(streams: ZStream[R, E, O]*)(implicit trace: Trace): ZStream[R, E, O]

Merges a variable list of streams in a non-deterministic fashion. Up to n streams may be consumed in parallel and up to outputBuffer chunks may be buffered by this operator.

Merges a variable list of streams in a non-deterministic fashion. Up to n streams may be consumed in parallel and up to outputBuffer chunks may be buffered by this operator.

Attributes

def mergeAllUnbounded[R, E, O](outputBuffer: => Int)(streams: ZStream[R, E, O]*)(implicit trace: Trace): ZStream[R, E, O]

Like mergeAll, but runs all streams concurrently.

Like mergeAll, but runs all streams concurrently.

Attributes

def never(implicit trace: Trace): ZStream[Any, Nothing, Nothing]

The stream that never produces any value or fails with any error.

The stream that never produces any value or fails with any error.

Attributes

def paginate[R, E, A, S](s: => S)(f: S => (A, Option[S]))(implicit trace: Trace): ZStream[Any, Nothing, A]

Like unfold, but allows the emission of values to end one step further than the unfolding of the state. This is useful for embedding paginated APIs, hence the name.

Like unfold, but allows the emission of values to end one step further than the unfolding of the state. This is useful for embedding paginated APIs, hence the name.

Attributes

def paginateChunk[A, S](s: => S)(f: S => (Chunk[A], Option[S]))(implicit trace: Trace): ZStream[Any, Nothing, A]

Like unfoldChunk, but allows the emission of values to end one step further than the unfolding of the state. This is useful for embedding paginated APIs, hence the name.

Like unfoldChunk, but allows the emission of values to end one step further than the unfolding of the state. This is useful for embedding paginated APIs, hence the name.

Attributes

def paginateChunkZIO[R, E, A, S](s: => S)(f: S => ZIO[R, E, (Chunk[A], Option[S])])(implicit trace: Trace): ZStream[R, E, A]

Like unfoldChunkZIO, but allows the emission of values to end one step further than the unfolding of the state. This is useful for embedding paginated APIs, hence the name.

Like unfoldChunkZIO, but allows the emission of values to end one step further than the unfolding of the state. This is useful for embedding paginated APIs, hence the name.

Attributes

def paginateZIO[R, E, A, S](s: => S)(f: S => ZIO[R, E, (A, Option[S])])(implicit trace: Trace): ZStream[R, E, A]

Like unfoldZIO, but allows the emission of values to end one step further than the unfolding of the state. This is useful for embedding paginated APIs, hence the name.

Like unfoldZIO, but allows the emission of values to end one step further than the unfolding of the state. This is useful for embedding paginated APIs, hence the name.

Attributes

def provideLayer[RIn, E, ROut, RIn2, ROut2](layer: ZLayer[RIn, E, ROut])(stream: => ZStream[ROut & RIn2, E, ROut2])(implicit ev: Tag[RIn2], tag: Tag[ROut], trace: Trace): ZStream[RIn & RIn2, E, ROut2]
def range(min: => Int, max: => Int, chunkSize: => Int)(implicit trace: Trace): ZStream[Any, Nothing, Int]

Constructs a stream from a range of integers (lower bound included, upper bound not included)

Constructs a stream from a range of integers (lower bound included, upper bound not included)

Attributes

def repeat[A](a: => A)(implicit trace: Trace): ZStream[Any, Nothing, A]

Repeats the provided value infinitely.

Repeats the provided value infinitely.

Attributes

def repeatWithSchedule[R, A](a: => A, schedule: => Schedule[R, A, _])(implicit trace: Trace): ZStream[R, Nothing, A]

Repeats the value using the provided schedule.

Repeats the value using the provided schedule.

Attributes

def repeatZIO[R, E, A](fa: => ZIO[R, E, A])(implicit trace: Trace): ZStream[R, E, A]

Creates a stream from an effect producing a value of type A which repeats forever.

Creates a stream from an effect producing a value of type A which repeats forever.

Attributes

def repeatZIOChunk[R, E, A](fa: => ZIO[R, E, Chunk[A]])(implicit trace: Trace): ZStream[R, E, A]

Creates a stream from an effect producing chunks of A values which repeats forever.

Creates a stream from an effect producing chunks of A values which repeats forever.

Attributes

def repeatZIOChunkOption[R, E, A](fa: => ZIO[R, Option[E], Chunk[A]])(implicit trace: Trace): ZStream[R, E, A]

Creates a stream from an effect producing chunks of A values until it fails with None.

Creates a stream from an effect producing chunks of A values until it fails with None.

Attributes

def repeatZIOOption[R, E, A](fa: => ZIO[R, Option[E], A])(implicit trace: Trace): ZStream[R, E, A]

Creates a stream from an effect producing values of type A until it fails with None.

Creates a stream from an effect producing values of type A until it fails with None.

Attributes

def repeatZIOWithSchedule[R, E, A](effect: => ZIO[R, E, A], schedule: => Schedule[R, A, Any])(implicit trace: Trace): ZStream[R, E, A]

Creates a stream from an effect producing a value of type A, which is repeated using the specified schedule.

Creates a stream from an effect producing a value of type A, which is repeated using the specified schedule.

Attributes

Creates a single-valued stream from a scoped resource

Creates a single-valued stream from a scoped resource

Attributes

def service[A : Tag](implicit evidence$1: Tag[A], trace: Trace): ZStream[A, Nothing, A]

Accesses the specified service in the environment of the effect.

Accesses the specified service in the environment of the effect.

Attributes

def serviceAt[Service]: ServiceAtPartiallyApplied[Service]

Accesses the service corresponding to the specified key in the environment.

Accesses the service corresponding to the specified key in the environment.

Attributes

Accesses the specified service in the environment of the stream.

Accesses the specified service in the environment of the stream.

Attributes

Accesses the specified service in the environment of the stream in the context of a stream.

Accesses the specified service in the environment of the stream in the context of a stream.

Attributes

Accesses the specified service in the environment of the stream in the context of an effect.

Accesses the specified service in the environment of the stream in the context of an effect.

Attributes

def succeed[A](a: => A)(implicit trace: Trace): ZStream[Any, Nothing, A]

Creates a single-valued pure stream

Creates a single-valued pure stream

Attributes

def suspend[R, E, A](stream: => ZStream[R, E, A]): ZStream[R, E, A]

Returns a lazily constructed stream.

Returns a lazily constructed stream.

Attributes

def tagged(key: => String, value: => String)(implicit trace: Trace): ZStream[Any, Nothing, Unit]

Annotates each metric in streams composed after this with the specified tag.

Annotates each metric in streams composed after this with the specified tag.

Attributes

def tagged(tag: => MetricLabel, tags: MetricLabel*)(implicit trace: Trace): ZStream[Any, Nothing, Unit]

Annotates each metric in streams composed after this with the specified tag.

Annotates each metric in streams composed after this with the specified tag.

Attributes

def tagged(tags: => Set[MetricLabel])(implicit trace: Trace): ZStream[Any, Nothing, Unit]

Annotates each metric in streams composed after this with the specified tag.

Annotates each metric in streams composed after this with the specified tag.

Attributes

def tags(implicit trace: Trace): ZStream[Any, Nothing, Set[MetricLabel]]

Retrieves the metric tags associated with the current scope.

Retrieves the metric tags associated with the current scope.

Attributes

def tick(interval: => Duration)(implicit trace: Trace): ZStream[Any, Nothing, Unit]

A stream that emits Unit values spaced by the specified duration.

A stream that emits Unit values spaced by the specified duration.

Attributes

def unfold[S, A](s: => S)(f: S => Option[(A, S)])(implicit trace: Trace): ZStream[Any, Nothing, A]

Creates a stream by peeling off the "layers" of a value of type S

Creates a stream by peeling off the "layers" of a value of type S

Attributes

def unfoldChunk[S, A](s: => S)(f: S => Option[(Chunk[A], S)])(implicit trace: Trace): ZStream[Any, Nothing, A]

Creates a stream by peeling off the "layers" of a value of type S.

Creates a stream by peeling off the "layers" of a value of type S.

Attributes

def unfoldChunkZIO[R, E, A, S](s: => S)(f: S => ZIO[R, E, Option[(Chunk[A], S)]])(implicit trace: Trace): ZStream[R, E, A]

Creates a stream by effectfully peeling off the "layers" of a value of type S

Creates a stream by effectfully peeling off the "layers" of a value of type S

Attributes

def unfoldZIO[R, E, A, S](s: => S)(f: S => ZIO[R, E, Option[(A, S)]])(implicit trace: Trace): ZStream[R, E, A]

Creates a stream by effectfully peeling off the "layers" of a value of type S

Creates a stream by effectfully peeling off the "layers" of a value of type S

Attributes

def unwrap[R, E, A](fa: => ZIO[R, E, ZStream[R, E, A]])(implicit trace: Trace): ZStream[R, E, A]

Creates a stream produced from an effect

Creates a stream produced from an effect

Attributes

Creates a stream produced from a scoped ZIO

Creates a stream produced from a scoped ZIO

Attributes

def when[R, E, O](b: => Boolean)(zStream: => ZStream[R, E, O])(implicit trace: Trace): ZStream[R, E, O]

Returns the specified stream if the given condition is satisfied, otherwise returns an empty stream.

Returns the specified stream if the given condition is satisfied, otherwise returns an empty stream.

Attributes

def whenCase[R, E, A, O](a: => A)(pf: PartialFunction[A, ZStream[R, E, O]])(implicit trace: Trace): ZStream[R, E, O]

Returns the resulting stream when the given PartialFunction is defined for the given value, otherwise returns an empty stream.

Returns the resulting stream when the given PartialFunction is defined for the given value, otherwise returns an empty stream.

Attributes

def whenCaseZIO[R, E, A](a: => ZIO[R, E, A]): WhenCaseZIO[R, E, A]

Returns the resulting stream when the given PartialFunction is defined for the given effectful value, otherwise returns an empty stream.

Returns the resulting stream when the given PartialFunction is defined for the given effectful value, otherwise returns an empty stream.

Attributes

def whenZIO[R, E](b: => ZIO[R, E, Boolean]): WhenZIO[R, E]

Returns the specified stream if the given effectful condition is satisfied, otherwise returns an empty stream.

Returns the specified stream if the given effectful condition is satisfied, otherwise returns an empty stream.

Attributes

Inherited methods

def async[R, E, A](register: Emit[R, E, A, Unit] => Unit, outputBuffer: => Int)(implicit trace: Trace): ZStream[R, E, A]

Creates a stream from an asynchronous callback that can be called multiple times. The optionality of the error type E can be used to signal the end of the stream, by setting it to None.

Creates a stream from an asynchronous callback that can be called multiple times. The optionality of the error type E can be used to signal the end of the stream, by setting it to None.

Attributes

Inherited from:
ZStreamPlatformSpecificConstructors (hidden)
def asyncInterrupt[R, E, A](register: Emit[R, E, A, Unit] => Either[URIO[R, Any], ZStream[R, E, A]], outputBuffer: => Int)(implicit trace: Trace): ZStream[R, E, A]

Creates a stream from an asynchronous callback that can be called multiple times. The registration of the callback returns either a canceler or synchronously returns a stream. The optionality of the error type E can be used to signal the end of the stream, by setting it to None.

Creates a stream from an asynchronous callback that can be called multiple times. The registration of the callback returns either a canceler or synchronously returns a stream. The optionality of the error type E can be used to signal the end of the stream, by setting it to None.

Attributes

Inherited from:
ZStreamPlatformSpecificConstructors (hidden)
def asyncMaybe[R, E, A](register: Emit[R, E, A, Unit] => Option[ZStream[R, E, A]], outputBuffer: => Int)(implicit trace: Trace): ZStream[R, E, A]

Creates a stream from an asynchronous callback that can be called multiple times. The registration of the callback can possibly return the stream synchronously. The optionality of the error type E can be used to signal the end of the stream, by setting it to None.

Creates a stream from an asynchronous callback that can be called multiple times. The registration of the callback can possibly return the stream synchronously. The optionality of the error type E can be used to signal the end of the stream, by setting it to None.

Attributes

Inherited from:
ZStreamPlatformSpecificConstructors (hidden)
def asyncScoped[R, E, A](register: (ZIO[R, Option[E], Chunk[A]] => Unit) => ZIO[Scope & R, E, Any], outputBuffer: => Int)(implicit trace: Trace): ZStream[R, E, A]

Creates a stream from an asynchronous callback that can be called multiple times. The registration of the callback itself returns an a scoped resource. The optionality of the error type E can be used to signal the end of the stream, by setting it to None.

Creates a stream from an asynchronous callback that can be called multiple times. The registration of the callback itself returns an a scoped resource. The optionality of the error type E can be used to signal the end of the stream, by setting it to None.

Attributes

Inherited from:
ZStreamPlatformSpecificConstructors (hidden)
def asyncZIO[R, E, A](register: Emit[R, E, A, Unit] => ZIO[R, E, Any], outputBuffer: => Int)(implicit trace: Trace): ZStream[R, E, A]

Creates a stream from an asynchronous callback that can be called multiple times The registration of the callback itself returns an effect. The optionality of the error type E can be used to signal the end of the stream, by setting it to None.

Creates a stream from an asynchronous callback that can be called multiple times The registration of the callback itself returns an effect. The optionality of the error type E can be used to signal the end of the stream, by setting it to None.

Attributes

Inherited from:
ZStreamPlatformSpecificConstructors (hidden)
final def fromFile(file: => File, chunkSize: => Int)(implicit trace: Trace): ZStream[Any, Throwable, Byte]

Creates a stream of bytes from the specified file.

Creates a stream of bytes from the specified file.

Attributes

Inherited from:
ZStreamPlatformSpecificConstructors (hidden)
final def fromFileName(name: => String, chunkSize: => Int)(implicit trace: Trace): ZStream[Any, Throwable, Byte]

Creates a stream of bytes from a file at the specified path represented by a string.

Creates a stream of bytes from a file at the specified path represented by a string.

Attributes

Inherited from:
ZStreamPlatformSpecificConstructors (hidden)
final def fromFileURI(uri: => URI, chunkSize: => Int)(implicit trace: Trace): ZStream[Any, Throwable, Byte]

Creates a stream of bytes from a file at the specified uri.

Creates a stream of bytes from a file at the specified uri.

Attributes

Inherited from:
ZStreamPlatformSpecificConstructors (hidden)
final def fromJavaStream[A](stream: => Stream[A], chunkSize: Int)(implicit trace: Trace): ZStream[Any, Throwable, A]

Creates a stream from a Java stream

Creates a stream from a Java stream

Attributes

Inherited from:
ZStreamPlatformSpecificConstructors (hidden)
final def fromJavaStream[A](stream: => Stream[A])(implicit trace: Trace): ZStream[Any, Throwable, A]

Creates a stream from a Java stream

Creates a stream from a Java stream

Attributes

Inherited from:
ZStreamPlatformSpecificConstructors (hidden)
final def fromJavaStreamScoped[R, A](stream: => ZIO[Scope & R, Throwable, Stream[A]], chunkSize: Int)(implicit trace: Trace): ZStream[R, Throwable, A]

Creates a stream from a scoped Java stream

Creates a stream from a scoped Java stream

Attributes

Inherited from:
ZStreamPlatformSpecificConstructors (hidden)
final def fromJavaStreamScoped[R, A](stream: => ZIO[Scope & R, Throwable, Stream[A]])(implicit trace: Trace): ZStream[R, Throwable, A]

Creates a stream from a scoped Java stream

Creates a stream from a scoped Java stream

Attributes

Inherited from:
ZStreamPlatformSpecificConstructors (hidden)
final def fromJavaStreamSucceed[R, A](stream: => Stream[A], chunkSize: Int)(implicit trace: Trace): ZStream[R, Nothing, A]

Creates a stream from a Java stream

Creates a stream from a Java stream

Attributes

Inherited from:
ZStreamPlatformSpecificConstructors (hidden)
final def fromJavaStreamSucceed[R, A](stream: => Stream[A])(implicit trace: Trace): ZStream[R, Nothing, A]

Creates a stream from a Java stream

Creates a stream from a Java stream

Attributes

Inherited from:
ZStreamPlatformSpecificConstructors (hidden)
final def fromJavaStreamZIO[R, A](stream: => ZIO[R, Throwable, Stream[A]], chunkSize: Int)(implicit trace: Trace): ZStream[R, Throwable, A]

Creates a stream from a Java stream

Creates a stream from a Java stream

Attributes

Inherited from:
ZStreamPlatformSpecificConstructors (hidden)
final def fromJavaStreamZIO[R, A](stream: => ZIO[R, Throwable, Stream[A]])(implicit trace: Trace): ZStream[R, Throwable, A]

Creates a stream from a Java stream

Creates a stream from a Java stream

Attributes

Inherited from:
ZStreamPlatformSpecificConstructors (hidden)
def fromOutputStreamWriter(write: OutputStream => Unit, chunkSize: => Int)(implicit trace: Trace): ZStream[Any, Throwable, Byte]

Creates a stream from a callback that writes to java.io.OutputStream. Note: the input stream will be closed after the write is done.

Creates a stream from a callback that writes to java.io.OutputStream. Note: the input stream will be closed after the write is done.

Attributes

Inherited from:
ZStreamPlatformSpecificConstructors (hidden)
final def fromPath(path: => Path, chunkSize: => Int)(implicit trace: Trace): ZStream[Any, Throwable, Byte]

Creates a stream of bytes from a file at the specified path.

Creates a stream of bytes from a file at the specified path.

Attributes

Inherited from:
ZStreamPlatformSpecificConstructors (hidden)
def fromReader(reader: => Reader, chunkSize: => Int)(implicit trace: Trace): ZStream[Any, IOException, Char]

Creates a stream from java.io.Reader.

Creates a stream from java.io.Reader.

Attributes

Inherited from:
ZStreamPlatformSpecificConstructors (hidden)
def fromReaderScoped[R](reader: => ZIO[Scope & R, IOException, Reader], chunkSize: => Int)(implicit trace: Trace): ZStream[R, IOException, Char]

Creates a stream from scoped java.io.Reader.

Creates a stream from scoped java.io.Reader.

Attributes

Inherited from:
ZStreamPlatformSpecificConstructors (hidden)
def fromReaderZIO[R](reader: => ZIO[R, IOException, Reader], chunkSize: => Int)(implicit trace: Trace): ZStream[R, IOException, Char]

Creates a stream from an effect producing java.io.Reader.

Creates a stream from an effect producing java.io.Reader.

Attributes

Inherited from:
ZStreamPlatformSpecificConstructors (hidden)
final def fromResource(path: => String, chunkSize: => Int)(implicit trace: Trace): ZStream[Any, IOException, Byte]

Creates a stream from the resource specified in path

Creates a stream from the resource specified in path

Attributes

Inherited from:
ZStreamPlatformSpecificConstructors (hidden)
def fromSocketServer(port: => Int, host: => Option[String])(implicit trace: Trace): ZStream[Any, Throwable, Connection]

Create a stream of accepted connection from server socket Emit socket Connection from which you can read / write and ensure it is closed after it is used

Create a stream of accepted connection from server socket Emit socket Connection from which you can read / write and ensure it is closed after it is used

Attributes

Inherited from:
ZStreamPlatformSpecificConstructors (hidden)

Concrete fields

final val DefaultChunkSize: 4096

The default chunk size used by the various combinators and constructors of ZStream.

The default chunk size used by the various combinators and constructors of ZStream.

Attributes

val unit: ZStream[Any, Nothing, Unit]

A stream that contains a single Unit value.

A stream that contains a single Unit value.

Attributes

Implicits

Implicits

final implicit def RefineToOrDieOps[R, E <: Throwable, A](self: ZStream[R, E, A]): RefineToOrDieOps[R, E, A]
final implicit def SortedByKey[R, E, K, A](self: ZStream[R, E, (K, A)]): SortedByKey[R, E, K, A]

Provides extension methods for streams that are sorted by distinct keys.

Provides extension methods for streams that are sorted by distinct keys.

Attributes

final implicit def SyntaxOps[R, E, O](self: ZStream[R, E, O]): SyntaxOps[R, E, O]