object ZStream extends ZStreamPlatformSpecificConstructors
- Alphabetic
- By Inheritance
- ZStream
- ZStreamPlatformSpecificConstructors
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- final class Connection extends AnyRef
Accepted connection made to a specific channel
AsynchronousServerSocketChannel
Accepted connection made to a specific channel
AsynchronousServerSocketChannel
- Definition Classes
- ZStreamPlatformSpecificConstructors
- 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.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 typeZIO[R, Option[E], Chunk[A]]
, where succeeding with aChunk[A]
indicates to emit those elements, failing withSome[E]
indicates to terminate with that error, and failing withNone
indicates to terminate with an end of stream signal. - final class EnvironmentWithPartiallyApplied[R] extends AnyVal
- final class EnvironmentWithStreamPartiallyApplied[R] extends AnyVal
- final class EnvironmentWithZIOPartiallyApplied[R] extends AnyVal
- sealed trait GroupBy[-R, +E, +K, +V] extends AnyRef
Representation of a grouped stream.
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.
- sealed trait HaltStrategy extends AnyRef
- final class ProvideSomeLayer[R0, -R, +E, +A] extends AnyVal
- type Pull[-R, +E, +A] = ZIO[R, Option[E], Chunk[A]]
- implicit final class RefineToOrDieOps[R, E <: Throwable, A] extends AnyVal
- final class ScopedPartiallyApplied[R] extends AnyVal
- final class ServiceAtPartiallyApplied[Service] extends AnyVal
- final class ServiceWithPartiallyApplied[Service] extends AnyVal
- final class ServiceWithStreamPartiallyApplied[Service] extends AnyVal
- final class ServiceWithZIOPartiallyApplied[Service] extends AnyVal
- implicit final class SortedByKey[R, E, K, A] extends AnyRef
Provides extension methods for streams that are sorted by distinct keys.
- implicit final class SyntaxOps[-R, +E, O] extends AnyRef
- final class UnwrapScopedPartiallyApplied[R] extends AnyVal
- final class UpdateService[-R, +E, +A, M] extends AnyVal
- final class UpdateServiceAt[-R, +E, +A, Service] extends AnyVal
- final class WhenCaseZIO[R, E, A] extends AnyVal
- final class WhenZIO[R, E] extends AnyVal
- trait ZStreamConstructor[Input] extends AnyRef
A
ZStreamConstructor[Input]
knows how to construct aZStream
value from an input of typeInput
.A
ZStreamConstructor[Input]
knows how to construct aZStream
value from an input of typeInput
. This allows the type of theZStream
value constructed to depend onInput
. - trait ZStreamConstructorLowPriority1 extends ZStreamConstructorLowPriority2
- trait ZStreamConstructorLowPriority2 extends ZStreamConstructorLowPriority3
- trait ZStreamConstructorLowPriority3 extends AnyRef
- trait ZStreamConstructorPlatformSpecific extends ZStreamConstructorLowPriority1
- Definition Classes
- ZStreamPlatformSpecificConstructors
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final val DefaultChunkSize: Int(4096)
The default chunk size used by the various combinators and constructors of ZStream.
- 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 theZStream
. - 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
- 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
- def alphanumeric(implicit trace: Trace): ZStream[Any, Nothing, Char]
An infinite stream of random alphanumeric characters.
- def apply[A](as: A*)(implicit trace: Trace): ZStream[Any, Nothing, A]
Creates a pure stream from a variable list of values
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def async[R, E, A](register: (Emit[R, E, A, Unit]) => Unit, outputBuffer: => Int = 16)(implicit trace: Trace): ZStream[R, E, A]
Creates a stream from an asynchronous callback that can be called multiple times.
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 toNone
.- Definition Classes
- ZStreamPlatformSpecificConstructors
- def asyncInterrupt[R, E, A](register: (Emit[R, E, A, Unit]) => Either[URIO[R, Any], ZStream[R, E, A]], outputBuffer: => Int = 16)(implicit trace: Trace): ZStream[R, E, A]
Creates a stream from an asynchronous callback that can be called multiple times.
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 toNone
.- Definition Classes
- ZStreamPlatformSpecificConstructors
- def asyncMaybe[R, E, A](register: (Emit[R, E, A, Unit]) => Option[ZStream[R, E, A]], outputBuffer: => Int = 16)(implicit trace: Trace): ZStream[R, E, A]
Creates a stream from an asynchronous callback that can be called multiple times.
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 toNone
.- Definition Classes
- ZStreamPlatformSpecificConstructors
- def asyncScoped[R, E, A](register: ((ZIO[R, Option[E], Chunk[A]]) => Unit) => ZIO[Scope with R, E, Any], outputBuffer: => Int = 16)(implicit trace: Trace): ZStream[R, E, A]
Creates a stream from an asynchronous callback that can be called multiple times.
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 toNone
.- Definition Classes
- ZStreamPlatformSpecificConstructors
- def asyncZIO[R, E, A](register: (Emit[R, E, A, Unit]) => ZIO[R, E, Any], outputBuffer: => Int = 16)(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.
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 toNone
.- Definition Classes
- ZStreamPlatformSpecificConstructors
- 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.
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.
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- 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.
- def debug(value: => Any)(implicit trace: Trace): ZStream[Any, Nothing, Unit]
Prints the specified message to the console for debugging purposes.
- def die(ex: => Throwable)(implicit trace: Trace): ZStream[Any, Nothing, Nothing]
The stream that dies with the
ex
. - def dieMessage(msg: => String)(implicit trace: Trace): ZStream[Any, Nothing, Nothing]
The stream that dies with an exception described by
msg
. - 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
. - def empty(implicit trace: Trace): ZStream[Any, Nothing, Nothing]
The empty stream
- def environment[R](implicit trace: Trace): ZStream[R, Nothing, ZEnvironment[R]]
Accesses the whole environment of the stream.
- def environmentWith[R]: EnvironmentWithPartiallyApplied[R]
Accesses the environment of the stream.
- def environmentWithStream[R]: EnvironmentWithStreamPartiallyApplied[R]
Accesses the environment of the stream in the context of a stream.
- def environmentWithZIO[R]: EnvironmentWithZIOPartiallyApplied[R]
Accesses the environment of the stream in the context of an effect.
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- 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.
- def fail[E](error: => E)(implicit trace: Trace): ZStream[Any, E, Nothing]
The stream that always fails with the
error
- def failCause[E](cause: => Cause[E])(implicit trace: Trace): ZStream[Any, E, Nothing]
The stream that always fails with
cause
. - 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.
- 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
- 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
- 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.
- 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.
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.
- 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.
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.
- 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.
- def fromChunkQueue[O](queue: => Dequeue[Chunk[O]])(implicit trace: Trace): ZStream[Any, Nothing, O]
Creates a stream from a queue of values
- def fromChunkQueueWithShutdown[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. The queue will be shutdown once the stream is closed.
- def fromChunks[O](cs: Chunk[O]*)(implicit trace: Trace): ZStream[Any, Nothing, O]
Creates a stream from an arbitrary number of chunks.
- final def fromFile(file: => File, chunkSize: => Int = ZStream.DefaultChunkSize)(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.
- Definition Classes
- ZStreamPlatformSpecificConstructors
- final def fromFileName(name: => String, chunkSize: => Int = ZStream.DefaultChunkSize)(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.
- Definition Classes
- ZStreamPlatformSpecificConstructors
- final def fromFileURI(uri: => URI, chunkSize: => Int = ZStream.DefaultChunkSize)(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.
- Definition Classes
- ZStreamPlatformSpecificConstructors
- def fromHub[A](hub: => Hub[A], maxChunkSize: => Int = DefaultChunkSize)(implicit trace: Trace): ZStream[Any, Nothing, A]
Creates a stream from a subscription to a hub.
- def fromHubScoped[A](hub: => Hub[A], maxChunkSize: => Int = DefaultChunkSize)(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.
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.
- def fromHubScopedWithShutdown[A](hub: => Hub[A], maxChunkSize: => Int = DefaultChunkSize)(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.
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.
- def fromHubWithShutdown[A](hub: => Hub[A], maxChunkSize: => Int = DefaultChunkSize)(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.
- def fromInputStream(is: => InputStream, chunkSize: => Int = ZStream.DefaultChunkSize)(implicit trace: Trace): ZStream[Any, IOException, Byte]
Creates a stream from a
java.io.InputStream
- def fromInputStreamScoped[R](is: => ZIO[Scope with R, IOException, InputStream], chunkSize: => Int = ZStream.DefaultChunkSize)(implicit trace: Trace): ZStream[R, IOException, Byte]
Creates a stream from a scoped
java.io.InputStream
value. - def fromInputStreamZIO[R](is: => ZIO[R, IOException, InputStream], chunkSize: => Int = ZStream.DefaultChunkSize)(implicit trace: Trace): ZStream[R, IOException, Byte]
Creates a stream from a
java.io.InputStream
.Creates a stream from a
java.io.InputStream
. Ensures that the input stream is closed after it is exhausted. - def fromIterable[O](as: => Iterable[O], chunkSize: => Int)(implicit trace: Trace): ZStream[Any, Nothing, O]
Creates a stream from an iterable collection of values
- def fromIterable[O](as: => Iterable[O])(implicit trace: Trace): ZStream[Any, Nothing, O]
Creates a stream from an iterable collection of values
- 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]
- 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]
- def fromIterator[A](iterator: => Iterator[A], maxChunkSize: => Int = DefaultChunkSize)(implicit trace: Trace): ZStream[Any, Throwable, A]
Creates a stream from an iterator
- def fromIteratorScoped[R, A](iterator: => ZIO[Scope with R, Throwable, Iterator[A]], maxChunkSize: => Int = DefaultChunkSize)(implicit trace: Trace): ZStream[R, Throwable, A]
Creates a stream from a scoped iterator
- def fromIteratorSucceed[A](iterator: => Iterator[A], maxChunkSize: => Int = DefaultChunkSize)(implicit trace: Trace): ZStream[Any, Nothing, A]
Creates a stream from an iterator
- 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
- 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
- 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
- def fromJavaIterator[A](iterator: => Iterator[A])(implicit trace: Trace): ZStream[Any, Throwable, A]
Creates a stream from a Java iterator that may throw exceptions
- def fromJavaIteratorScoped[R, A](iterator: => ZIO[Scope with R, Throwable, Iterator[A]], chunkSize: Int)(implicit trace: Trace): ZStream[R, Throwable, A]
Creates a stream from a scoped iterator
- def fromJavaIteratorScoped[R, A](iterator: => ZIO[Scope with R, Throwable, Iterator[A]])(implicit trace: Trace): ZStream[R, Throwable, A]
Creates a stream from a scoped iterator
- def fromJavaIteratorSucceed[A](iterator: => Iterator[A], chunkSize: Int)(implicit trace: Trace): ZStream[Any, Nothing, A]
Creates a stream from a Java iterator
- def fromJavaIteratorSucceed[A](iterator: => Iterator[A])(implicit trace: Trace): ZStream[Any, Nothing, A]
Creates a stream from a Java iterator
- 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
- 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
- final def fromJavaStream[A](stream: => java.util.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
- Definition Classes
- ZStreamPlatformSpecificConstructors
- final def fromJavaStream[A](stream: => java.util.stream.Stream[A])(implicit trace: Trace): ZStream[Any, Throwable, A]
Creates a stream from a Java stream
Creates a stream from a Java stream
- Definition Classes
- ZStreamPlatformSpecificConstructors
- final def fromJavaStreamScoped[R, A](stream: => ZIO[Scope with R, Throwable, java.util.stream.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
- Definition Classes
- ZStreamPlatformSpecificConstructors
- final def fromJavaStreamScoped[R, A](stream: => ZIO[Scope with R, Throwable, java.util.stream.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
- Definition Classes
- ZStreamPlatformSpecificConstructors
- final def fromJavaStreamSucceed[R, A](stream: => java.util.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
- Definition Classes
- ZStreamPlatformSpecificConstructors
- final def fromJavaStreamSucceed[R, A](stream: => java.util.stream.Stream[A])(implicit trace: Trace): ZStream[R, Nothing, A]
Creates a stream from a Java stream
Creates a stream from a Java stream
- Definition Classes
- ZStreamPlatformSpecificConstructors
- final def fromJavaStreamZIO[R, A](stream: => ZIO[R, Throwable, java.util.stream.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
- Definition Classes
- ZStreamPlatformSpecificConstructors
- final def fromJavaStreamZIO[R, A](stream: => ZIO[R, Throwable, java.util.stream.Stream[A]])(implicit trace: Trace): ZStream[R, Throwable, A]
Creates a stream from a Java stream
Creates a stream from a Java stream
- Definition Classes
- ZStreamPlatformSpecificConstructors
- def fromOutputStreamWriter(write: (OutputStream) => Unit, chunkSize: => Int = ZStream.DefaultChunkSize)(implicit trace: Trace): ZStream[Any, Throwable, Byte]
Creates a stream from a callback that writes to
java.io.OutputStream
.Creates a stream from a callback that writes to
java.io.OutputStream
. Note: the input stream will be closed after thewrite
is done.- Definition Classes
- ZStreamPlatformSpecificConstructors
- final def fromPath(path: => Path, chunkSize: => Int = ZStream.DefaultChunkSize)(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.
- Definition Classes
- ZStreamPlatformSpecificConstructors
- def fromPull[R, E, A](zio: ZIO[Scope with 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.
Creates a stream from a ZIO effect that pulls elements from another stream. See
toPull
for reference - def fromQueue[O](queue: => Dequeue[O], maxChunkSize: => Int = DefaultChunkSize)(implicit trace: Trace): ZStream[Any, Nothing, O]
Creates a stream from a queue of values
Creates a stream from a queue of values
- maxChunkSize
Maximum number of queued elements to put in one chunk in the stream
- def fromQueueWithShutdown[O](queue: => Dequeue[O], maxChunkSize: => Int = DefaultChunkSize)(implicit trace: Trace): ZStream[Any, Nothing, O]
Creates a stream from a queue of values.
Creates a stream from a queue of values. The queue will be shutdown once the stream is closed.
- maxChunkSize
Maximum number of queued elements to put in one chunk in the stream
- def fromReader(reader: => Reader, chunkSize: => Int = ZStream.DefaultChunkSize)(implicit trace: Trace): ZStream[Any, IOException, Char]
Creates a stream from
java.io.Reader
.Creates a stream from
java.io.Reader
.- Definition Classes
- ZStreamPlatformSpecificConstructors
- def fromReaderScoped[R](reader: => ZIO[Scope with R, IOException, Reader], chunkSize: => Int = ZStream.DefaultChunkSize)(implicit trace: Trace): ZStream[R, IOException, Char]
Creates a stream from scoped
java.io.Reader
.Creates a stream from scoped
java.io.Reader
.- Definition Classes
- ZStreamPlatformSpecificConstructors
- def fromReaderZIO[R](reader: => ZIO[R, IOException, Reader], chunkSize: => Int = ZStream.DefaultChunkSize)(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
.- Definition Classes
- ZStreamPlatformSpecificConstructors
- final def fromResource(path: => String, chunkSize: => Int = ZStream.DefaultChunkSize)(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
- Definition Classes
- ZStreamPlatformSpecificConstructors
- 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.
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.
- def fromSocketServer(port: => Int, host: => Option[String] = None)(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 usedCreate 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- Definition Classes
- ZStreamPlatformSpecificConstructors
- def fromTPriorityQueue[A](queue: => TPriorityQueue[A])(implicit trace: Trace): ZStream[Any, Nothing, A]
Creates a stream from a zio.stm.TPriorityQueue of values.
- def fromTQueue[A](queue: => TDequeue[A])(implicit trace: Trace): ZStream[Any, Nothing, A]
Creates a stream from a zio.stm.TQueue of values.
- 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
- 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 - final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- 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))), ...
- def log(message: => String)(implicit trace: Trace): ZStream[Any, Nothing, Unit]
Logs the specified message at the current log level.
- 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.
- 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.
- 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.
- def logAnnotations(implicit trace: Trace): ZStream[Any, Nothing, Map[String, String]]
Retrieves the log annotations associated with the current scope.
- def logDebug(message: => String)(implicit trace: Trace): ZStream[Any, Nothing, Unit]
Logs the specified message at the debug log level.
- def logError(message: => String)(implicit trace: Trace): ZStream[Any, Nothing, Unit]
Logs the specified message at the error log level.
- def logErrorCause(cause: => Cause[Any])(implicit trace: Trace): ZStream[Any, Nothing, Unit]
Logs the specified cause as an error.
- def logFatal(message: => String)(implicit trace: Trace): ZStream[Any, Nothing, Unit]
Logs the specified message at the fatal log level.
- def logInfo(message: => String)(implicit trace: Trace): ZStream[Any, Nothing, Unit]
Logs the specified message at the informational log level.
- def logLevel(level: LogLevel)(implicit trace: Trace): ZStream[Any, Nothing, Unit]
Sets the log level for streams composed after this.
- def logSpan(label: => String)(implicit trace: Trace): ZStream[Any, Nothing, Unit]
Adjusts the label for the logging span for streams composed after this.
- def logTrace(message: => String)(implicit trace: Trace): ZStream[Any, Nothing, Unit]
Logs the specified message at the trace log level.
- def logWarning(message: => String)(implicit trace: Trace): ZStream[Any, Nothing, Unit]
Logs the specified message at the warning log level.
- def mergeAll[R, E, O](n: => Int, outputBuffer: => Int = 16)(streams: ZStream[R, E, O]*)(implicit trace: Trace): ZStream[R, E, O]
Merges a variable list of streams in a non-deterministic fashion.
Merges a variable list of streams in a non-deterministic fashion. Up to
n
streams may be consumed in parallel and up tooutputBuffer
chunks may be buffered by this operator. - def mergeAllUnbounded[R, E, O](outputBuffer: => Int = 16)(streams: ZStream[R, E, O]*)(implicit trace: Trace): ZStream[R, E, O]
Like mergeAll, but runs all streams concurrently.
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def never(implicit trace: Trace): ZStream[Any, Nothing, Nothing]
The stream that never produces any value or fails with any error.
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- 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.
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.
- 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.
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.
- 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.
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.
- 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.
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.
- def provideLayer[RIn, E, ROut, RIn2, ROut2](layer: ZLayer[RIn, E, ROut])(stream: => ZStream[ROut with RIn2, E, ROut2])(implicit ev: zio.EnvironmentTag[RIn2], tag: zio.EnvironmentTag[ROut], trace: Trace): ZStream[RIn with RIn2, E, ROut2]
- def range(min: => Int, max: => Int, chunkSize: => Int = DefaultChunkSize)(implicit trace: Trace): ZStream[Any, Nothing, Int]
Constructs a stream from a range of integers (lower bound included, upper bound not included)
- def repeat[A](a: => A)(implicit trace: Trace): ZStream[Any, Nothing, A]
Repeats the provided value infinitely.
- def repeatWithSchedule[R, A](a: => A, schedule: => Schedule[R, A, _])(implicit trace: Trace): ZStream[R, Nothing, A]
Repeats the value using the provided schedule.
- 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. - 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. - 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. - 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. - 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. - def scoped[R]: ScopedPartiallyApplied[R]
Creates a single-valued stream from a scoped resource
- def scopedWith[R, E, A](f: (Scope) => ZIO[R, E, A])(implicit trace: Trace): ZStream[R, E, A]
Creates a single-valued stream from a scoped resource
- def service[A](implicit arg0: Tag[A], trace: Trace): ZStream[A, Nothing, A]
Accesses the specified service in the environment of the effect.
- def serviceAt[Service]: ServiceAtPartiallyApplied[Service]
Accesses the service corresponding to the specified key in the environment.
- def serviceWith[Service]: ServiceWithPartiallyApplied[Service]
Accesses the specified service in the environment of the stream.
- def serviceWithStream[Service]: ServiceWithStreamPartiallyApplied[Service]
Accesses the specified service in the environment of the stream in the context of a stream.
- def serviceWithZIO[Service]: ServiceWithZIOPartiallyApplied[Service]
Accesses the specified service in the environment of the stream in the context of an effect.
- def succeed[A](a: => A)(implicit trace: Trace): ZStream[Any, Nothing, A]
Creates a single-valued pure stream
- def suspend[R, E, A](stream: => ZStream[R, E, A]): ZStream[R, E, A]
Returns a lazily constructed stream.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def tagged(tags: => Set[MetricLabel])(implicit trace: Trace): ZStream[Any, Nothing, Unit]
Annotates each metric in streams composed after this with the specified tag.
- 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.
- 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.
- def tags(implicit trace: Trace): ZStream[Any, Nothing, Set[MetricLabel]]
Retrieves the metric tags associated with the current scope.
- def tick(interval: => zio.Duration)(implicit trace: Trace): ZStream[Any, Nothing, Unit]
A stream that emits Unit values spaced by the specified duration.
- def toString(): String
- Definition Classes
- AnyRef → Any
- 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
- 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
. - 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
- 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
- val unit: ZStream[Any, Nothing, Unit]
A stream that contains a single
Unit
value. - 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
- def unwrapScoped[R]: UnwrapScopedPartiallyApplied[R]
Creates a stream produced from a scoped ZIO
- def unwrapScopedWith[R, E, A](f: (Scope) => ZIO[R, E, ZStream[R, E, A]])(implicit trace: Trace): ZStream[R, E, A]
Creates a stream produced from a scoped ZIO
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- 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.
- 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. - 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. - 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.
- object Connection
- Definition Classes
- ZStreamPlatformSpecificConstructors
- object HaltStrategy
- object ZStreamConstructor extends ZStreamConstructorPlatformSpecific