object ZStream extends ZStreamPlatformSpecificConstructors
- Alphabetic
- By Inheritance
- ZStream
- ZStreamPlatformSpecificConstructors
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- 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 withNoneindicates 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.
- 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 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
- sealed trait TerminationStrategy extends AnyRef
- 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 aZStreamvalue from an input of typeInput.A
ZStreamConstructor[Input]knows how to construct aZStreamvalue from an input of typeInput. This allows the type of theZStreamvalue constructed to depend onInput. - trait ZStreamConstructorLowPriority1 extends ZStreamConstructorLowPriority2
- trait ZStreamConstructorLowPriority2 extends ZStreamConstructorLowPriority3
- trait ZStreamConstructorLowPriority3 extends AnyRef
- trait ZStreamConstructorPlatformSpecific extends ZStreamConstructorLowPriority1
- Definition Classes
- ZStreamPlatformSpecificConstructors
Deprecated Type Members
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: ZTraceElement): ZStream[R, E, O]
Submerges the error case of an
Eitherinto theZStream. - def acquireReleaseExitWith[R, E, A](acquire: ZIO[R, E, A])(release: (A, Exit[Any, Any]) => URIO[R, Any])(implicit trace: ZTraceElement): 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: ZTraceElement): ZStream[R, E, A]
Creates a stream from a single value that will get cleaned up after the stream is consumed
- def apply[A](as: A*)(implicit trace: ZTraceElement): 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, Future[Boolean]]) => Unit, outputBuffer: => Int = 16)(implicit trace: ZTraceElement): 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
Ecan 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, Future[Boolean]]) => Either[Canceler[R], ZStream[R, E, A]], outputBuffer: => Int = 16)(implicit trace: ZTraceElement): 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
Ecan be used to signal the end of the stream, by setting it toNone.- Definition Classes
- ZStreamPlatformSpecificConstructors
- def asyncManaged[R, E, A](register: ((ZIO[R, Option[E], Chunk[A]]) => Future[Boolean]) => ZManaged[R, E, Any], outputBuffer: => Int = 16)(implicit trace: ZTraceElement): 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 managed resource. The optionality of the error type
Ecan 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, Future[Boolean]]) => Option[ZStream[R, E, A]], outputBuffer: => Int = 16)(implicit trace: ZTraceElement): 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
Ecan 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, Future[Boolean]]) => ZIO[R, E, Any], outputBuffer: => Int = 16)(implicit trace: ZTraceElement): 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
Ecan 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: ZTraceElement): 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: ZTraceElement): ZStream[R, E, O]
Concatenates all of the streams in the chunk to one stream.
- def die(ex: => Throwable)(implicit trace: ZTraceElement): ZStream[Any, Nothing, Nothing]
The stream that dies with the
ex. - def dieMessage(msg: => String)(implicit trace: ZTraceElement): ZStream[Any, Nothing, Nothing]
The stream that dies with an exception described by
msg. - def done[E, A](exit: => Exit[E, A])(implicit trace: ZTraceElement): ZStream[Any, E, A]
The stream that ends with the zio.Exit value
exit. - def empty(implicit trace: ZTraceElement): ZStream[Any, Nothing, Nothing]
The empty stream
- def environment[R](implicit trace: ZTraceElement): 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: ZTraceElement): ZStream[R, E, Nothing]
Creates a stream that executes the specified effect but emits no elements.
- def fail[E](error: => E)(implicit trace: ZTraceElement): ZStream[Any, E, Nothing]
The stream that always fails with the
error - def failCause[E](cause: => Cause[E])(implicit trace: ZTraceElement): ZStream[Any, E, Nothing]
The stream that always fails with
cause. - def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def finalizer[R](finalizer: => URIO[R, Any])(implicit trace: ZTraceElement): 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: ZTraceElement): Out
- def fromChunk[O](chunk: => Chunk[O])(implicit trace: ZTraceElement): 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[R, E, O](hub: => ZHub[Nothing, R, Any, E, Nothing, Chunk[O]])(implicit trace: ZTraceElement): ZStream[R, E, O]
Creates a stream from a subscription to a hub.
- def fromChunkHubManaged[R, E, O](hub: => ZHub[Nothing, R, Any, E, Nothing, Chunk[O]])(implicit trace: ZTraceElement): ZManaged[Any, Nothing, ZStream[R, E, O]]
Creates a stream from a subscription to a hub in the context of a managed effect.
Creates a stream from a subscription to a hub in the context of a managed effect. The managed effect describes subscribing to receive messages from the hub while the stream describes taking messages from the hub.
- def fromChunkHubManagedWithShutdown[R, E, O](hub: => ZHub[Nothing, R, Any, E, Nothing, Chunk[O]])(implicit trace: ZTraceElement): ZManaged[Any, Nothing, ZStream[R, E, O]]
Creates a stream from a subscription to a hub in the context of a managed effect.
Creates a stream from a subscription to a hub in the context of a managed effect. The managed 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[R, E, O](hub: => ZHub[Nothing, R, Any, E, Nothing, Chunk[O]])(implicit trace: ZTraceElement): ZStream[R, E, 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[R, E, O](queue: => ZQueue[Nothing, R, Any, E, Nothing, Chunk[O]])(implicit trace: ZTraceElement): ZStream[R, E, O]
Creates a stream from a queue of values
- def fromChunkQueueWithShutdown[R, E, O](queue: => ZQueue[Nothing, R, Any, E, Nothing, Chunk[O]])(implicit trace: ZTraceElement): ZStream[R, E, 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: ZTraceElement): ZStream[Any, Nothing, O]
Creates a stream from an arbitrary number of chunks.
- def fromHub[R, E, A](hub: => ZHub[Nothing, R, Any, E, Nothing, A], maxChunkSize: => Int = DefaultChunkSize)(implicit trace: ZTraceElement): ZStream[R, E, A]
Creates a stream from a subscription to a hub.
- def fromHubManaged[R, E, A](hub: => ZHub[Nothing, R, Any, E, Nothing, A], maxChunkSize: => Int = DefaultChunkSize)(implicit trace: ZTraceElement): ZManaged[Any, Nothing, ZStream[R, E, A]]
Creates a stream from a subscription to a hub in the context of a managed effect.
Creates a stream from a subscription to a hub in the context of a managed effect. The managed effect describes subscribing to receive messages from the hub while the stream describes taking messages from the hub.
- def fromHubManagedWithShutdown[R, E, A](hub: => ZHub[Nothing, R, Any, E, Nothing, A], maxChunkSize: => Int = DefaultChunkSize)(implicit trace: ZTraceElement): ZManaged[Any, Nothing, ZStream[R, E, A]]
Creates a stream from a subscription to a hub in the context of a managed effect.
Creates a stream from a subscription to a hub in the context of a managed effect. The managed 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[R, E, A](hub: => ZHub[Nothing, R, Any, E, Nothing, A], maxChunkSize: => Int = DefaultChunkSize)(implicit trace: ZTraceElement): ZStream[R, E, 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: ZTraceElement): ZStream[Any, IOException, Byte]
Creates a stream from a
java.io.InputStream - def fromInputStreamManaged[R](is: => ZManaged[R, IOException, InputStream], chunkSize: => Int = ZStream.DefaultChunkSize)(implicit trace: ZTraceElement): ZStream[R, IOException, Byte]
Creates a stream from a managed
java.io.InputStreamvalue. - def fromInputStreamZIO[R](is: => ZIO[R, IOException, InputStream], chunkSize: => Int = ZStream.DefaultChunkSize)(implicit trace: ZTraceElement): 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])(implicit trace: ZTraceElement): ZStream[Any, Nothing, O]
Creates a stream from an iterable collection of values
- def fromIterableZIO[R, E, O](iterable: => ZIO[R, E, Iterable[O]])(implicit trace: ZTraceElement): 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: ZTraceElement): ZStream[Any, Throwable, A]
- def fromIteratorManaged[R, A](iterator: => ZManaged[R, Throwable, Iterator[A]], maxChunkSize: => Int = DefaultChunkSize)(implicit trace: ZTraceElement): ZStream[R, Throwable, A]
Creates a stream from a managed iterator
- def fromIteratorSucceed[A](iterator: => Iterator[A], maxChunkSize: => Int = DefaultChunkSize)(implicit trace: ZTraceElement): ZStream[Any, Nothing, A]
Creates a stream from an iterator
- def fromIteratorZIO[R, A](iterator: => ZIO[R, Throwable, Iterator[A]])(implicit trace: ZTraceElement): ZStream[R, Throwable, A]
Creates a stream from an iterator that may potentially throw exceptions
- def fromJavaIterator[A](iterator: => Iterator[A])(implicit trace: ZTraceElement): ZStream[Any, Throwable, A]
Creates a stream from a Java iterator that may throw exceptions
- def fromJavaIteratorManaged[R, A](iterator: => ZManaged[R, Throwable, Iterator[A]])(implicit trace: ZTraceElement): ZStream[R, Throwable, A]
Creates a stream from a managed iterator
- def fromJavaIteratorSucceed[A](iterator: => Iterator[A])(implicit trace: ZTraceElement): ZStream[Any, Nothing, A]
Creates a stream from a Java iterator
- def fromJavaIteratorZIO[R, A](iterator: => ZIO[R, Throwable, Iterator[A]])(implicit trace: ZTraceElement): ZStream[R, Throwable, A]
Creates a stream from a Java iterator that may potentially throw exceptions
- def fromPull[R, E, A](zio: ZManaged[R, Nothing, ZIO[R, Option[E], Chunk[A]]])(implicit trace: ZTraceElement): ZStream[R, E, A]
- def fromQueue[R, E, O](queue: => ZQueue[Nothing, R, Any, E, Nothing, O], maxChunkSize: => Int = DefaultChunkSize)(implicit trace: ZTraceElement): ZStream[R, E, 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[R, E, O](queue: => ZQueue[Nothing, R, Any, E, Nothing, O], maxChunkSize: => Int = DefaultChunkSize)(implicit trace: ZTraceElement): ZStream[R, E, 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 fromSchedule[R, A](schedule: => Schedule[R, Any, A])(implicit trace: ZTraceElement): ZStream[R with Clock, 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 fromTQueue[A](queue: => TQueue[A])(implicit trace: ZTraceElement): 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: ZTraceElement): 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: ZTraceElement): ZStream[R, E, A]
Creates a stream from an effect producing a value of type
Aor 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: ZTraceElement): ZStream[Any, Nothing, A]
The infinite stream of iterative function application: a, f(a), f(f(a)), f(f(f(a))), ...
- def managed[R, E, A](managed: => ZManaged[R, E, A])(implicit trace: ZTraceElement): ZStream[R, E, A]
Creates a single-valued stream from a managed resource
- def mergeAll[R, E, O](n: => Int, outputBuffer: => Int = 16)(streams: ZStream[R, E, O]*)(implicit trace: ZTraceElement): 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
nstreams may be consumed in parallel and up tooutputBufferchunks may be buffered by this operator. - def mergeAllUnbounded[R, E, O](outputBuffer: => Int = 16)(streams: ZStream[R, E, O]*)(implicit trace: ZTraceElement): ZStream[R, E, O]
Like mergeAll, but runs all streams concurrently.
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def never(implicit trace: ZTraceElement): 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: ZTraceElement): 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: ZTraceElement): 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: ZTraceElement): 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: ZTraceElement): 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](builder: ZLayer[RIn, E, ROut])(stream: => ZStream[ROut with RIn2, E, ROut2])(implicit ev: zio.Tag[RIn2], tag: zio.Tag[ROut], trace: ZTraceElement): ZStream[RIn with RIn2, E, ROut2]
- def range(min: => Int, max: => Int, chunkSize: => Int = DefaultChunkSize)(implicit trace: ZTraceElement): 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: ZTraceElement): ZStream[Any, Nothing, A]
Repeats the provided value infinitely.
- def repeatWithSchedule[R, A](a: => A, schedule: => Schedule[R, A, _])(implicit trace: ZTraceElement): ZStream[R with Clock, Nothing, A]
Repeats the value using the provided schedule.
- def repeatZIO[R, E, A](fa: => ZIO[R, E, A])(implicit trace: ZTraceElement): ZStream[R, E, A]
Creates a stream from an effect producing a value of type
Awhich repeats forever. - def repeatZIOChunk[R, E, A](fa: => ZIO[R, E, Chunk[A]])(implicit trace: ZTraceElement): ZStream[R, E, A]
Creates a stream from an effect producing chunks of
Avalues which repeats forever. - def repeatZIOChunkOption[R, E, A](fa: => ZIO[R, Option[E], Chunk[A]])(implicit trace: ZTraceElement): ZStream[R, E, A]
Creates a stream from an effect producing chunks of
Avalues until it fails with None. - def repeatZIOOption[R, E, A](fa: => ZIO[R, Option[E], A])(implicit trace: ZTraceElement): ZStream[R, E, A]
Creates a stream from an effect producing values of type
Auntil it fails with None. - def repeatZIOWithSchedule[R, E, A](effect: => ZIO[R, E, A], schedule: => Schedule[R, A, Any])(implicit trace: ZTraceElement): ZStream[R with Clock, E, A]
Creates a stream from an effect producing a value of type
A, which is repeated using the specified schedule. - def service[A](implicit arg0: zio.Tag[A], arg1: IsNotIntersection[A], trace: ZTraceElement): 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: ZTraceElement): 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 tick(interval: => zio.Duration)(implicit trace: ZTraceElement): ZStream[Clock, 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: ZTraceElement): 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: ZTraceElement): 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: ZTraceElement): 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: ZTraceElement): 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
Unitvalue. - def unwrap[R, E, A](fa: => ZIO[R, E, ZStream[R, E, A]])(implicit trace: ZTraceElement): ZStream[R, E, A]
Creates a stream produced from an effect
- def unwrapManaged[R, E, A](fa: => ZManaged[R, E, ZStream[R, E, A]])(implicit trace: ZTraceElement): ZStream[R, E, A]
Creates a stream produced from a ZManaged
- 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: ZTraceElement): 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: ZTraceElement): ZStream[R, E, O]
Returns the resulting stream when the given
PartialFunctionis 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
PartialFunctionis 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 Take
- object TerminationStrategy
- object ZStreamConstructor extends ZStreamConstructorPlatformSpecific
Deprecated Value Members
- def access[R]: EnvironmentWithPartiallyApplied[R]
Accesses the environment of the stream in the context of an effect.
Accesses the environment of the stream in the context of an effect.
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use environmentWith
- def accessM[R]: EnvironmentWithZIOPartiallyApplied[R]
Accesses the environment of the stream in the context of an effect.
Accesses the environment of the stream in the context of an effect.
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use environmentWithZIO
- def accessStream[R]: EnvironmentWithStreamPartiallyApplied[R]
Accesses the environment of the stream in the context of a stream.
Accesses the environment of the stream in the context of a stream.
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use environmentWithStream
- def accessZIO[R]: EnvironmentWithZIOPartiallyApplied[R]
Accesses the environment of the stream in the context of an effect.
Accesses the environment of the stream in the context of an effect.
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use environmentWithZIO
- def bracket[R, E, A](acquire: => ZIO[R, E, A])(release: (A) => URIO[R, Any])(implicit trace: ZTraceElement): 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
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use acquireReleaseWith
- def bracketExit[R, E, A](acquire: => ZIO[R, E, A])(release: (A, Exit[Any, Any]) => URIO[R, Any])(implicit trace: ZTraceElement): 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
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use acquireReleaseExitWith
- def crossN[R, E, A, B, C, D, F](zStream1: => ZStream[R, E, A], zStream2: => ZStream[R, E, B], zStream3: => ZStream[R, E, C], zStream4: => ZStream[R, E, D])(f: (A, B, C, D) => F)(implicit trace: ZTraceElement): ZStream[R, E, F]
Composes the specified streams to create a cartesian product of elements with a specified function.
Composes the specified streams to create a cartesian product of elements with a specified function. Subsequent stream would be run multiple times, for every combination of elements in the prior streams.
See also ZStream#zipN[R,E,A,B,C,D,F]* for the more common point-wise variant.
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use cross
- def crossN[R, E, A, B, C, D](zStream1: => ZStream[R, E, A], zStream2: => ZStream[R, E, B], zStream3: => ZStream[R, E, C])(f: (A, B, C) => D)(implicit trace: ZTraceElement): ZStream[R, E, D]
Composes the specified streams to create a cartesian product of elements with a specified function.
Composes the specified streams to create a cartesian product of elements with a specified function. Subsequent stream would be run multiple times, for every combination of elements in the prior streams.
See also ZStream#zipN[R,E,A,B,C,D]* for the more common point-wise variant.
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use cross
- def crossN[R, E, A, B, C](zStream1: => ZStream[R, E, A], zStream2: => ZStream[R, E, B])(f: (A, B) => C)(implicit trace: ZTraceElement): ZStream[R, E, C]
Composes the specified streams to create a cartesian product of elements with a specified function.
Composes the specified streams to create a cartesian product of elements with a specified function. Subsequent streams would be run multiple times, for every combination of elements in the prior streams.
See also ZStream#zipN[R,E,A,B,C]* for the more common point-wise variant.
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use cross
- def effectAsync[R, E, A](register: (Emit[R, E, A, Future[Boolean]]) => Unit, outputBuffer: => Int = 16)(implicit trace: ZTraceElement): 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
Ecan be used to signal the end of the stream, by setting it toNone.- Definition Classes
- ZStreamPlatformSpecificConstructors
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use async
- def effectAsyncInterrupt[R, E, A](register: (Emit[R, E, A, Future[Boolean]]) => Either[Canceler[R], ZStream[R, E, A]], outputBuffer: => Int = 16)(implicit trace: ZTraceElement): 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
Ecan be used to signal the end of the stream, by setting it toNone.- Definition Classes
- ZStreamPlatformSpecificConstructors
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use asyncInterrupt
- def effectAsyncM[R, E, A](register: (Emit[R, E, A, Future[Boolean]]) => ZIO[R, E, Any], outputBuffer: => Int = 16)(implicit trace: ZTraceElement): 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
Ecan be used to signal the end of the stream, by setting it toNone.- Definition Classes
- ZStreamPlatformSpecificConstructors
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use asyncZIO
- def effectAsyncMaybe[R, E, A](register: (Emit[R, E, A, Future[Boolean]]) => Option[ZStream[R, E, A]], outputBuffer: => Int = 16)(implicit trace: ZTraceElement): 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
Ecan be used to signal the end of the stream, by setting it toNone.- Definition Classes
- ZStreamPlatformSpecificConstructors
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use asyncMaybe
- def fromBlockingIterator[A](iterator: => Iterator[A])(implicit trace: ZTraceElement): ZStream[Any, Throwable, A]
Creates a stream from an blocking iterator that may throw exceptions.
Creates a stream from an blocking iterator that may throw exceptions.
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use blocking(fromIterator())
- def fromBlockingJavaIterator[A](iter: => Iterator[A])(implicit trace: ZTraceElement): ZStream[Any, Throwable, A]
Creates a stream from an blocking Java iterator that may throw exceptions.
Creates a stream from an blocking Java iterator that may throw exceptions.
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use blocking(fromJavaIterator())
- def fromEffect[R, E, A](fa: => ZIO[R, E, A])(implicit trace: ZTraceElement): ZStream[R, E, A]
Creates a stream from an effect producing a value of type
ACreates a stream from an effect producing a value of type
A- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use fromZIO
- def fromEffectOption[R, E, A](fa: => ZIO[R, Option[E], A])(implicit trace: ZTraceElement): ZStream[R, E, A]
Creates a stream from an effect producing a value of type
Aor an empty StreamCreates a stream from an effect producing a value of type
Aor an empty Stream- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use fromZIOOption
- def fromInputStreamEffect[R](is: => ZIO[R, IOException, InputStream], chunkSize: => Int = ZStream.DefaultChunkSize)(implicit trace: ZTraceElement): 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.- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use fromInputStreamZIO
- def fromIterableM[R, E, O](iterable: => ZIO[R, E, Iterable[O]])(implicit trace: ZTraceElement): 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]- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use fromIterableZIO
- def fromIteratorEffect[R, A](iterator: => ZIO[R, Throwable, Iterator[A]])(implicit trace: ZTraceElement): 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
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use fromIteratorZIO
- def fromIteratorTotal[A](iterator: => Iterator[A], maxChunkSize: => Int = DefaultChunkSize)(implicit trace: ZTraceElement): ZStream[Any, Nothing, A]
Creates a stream from an iterator
Creates a stream from an iterator
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use fromIteratorSucceed
- def fromJavaIteratorEffect[R, A](iterator: => ZIO[R, Throwable, Iterator[A]])(implicit trace: ZTraceElement): 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
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use fromJavaIteratorZIO
- def fromJavaIteratorTotal[A](iterator: => Iterator[A])(implicit trace: ZTraceElement): ZStream[Any, Nothing, A]
Creates a stream from a Java iterator
Creates a stream from a Java iterator
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use fromJavaIteratorSucceed
- def halt[E](cause: => Cause[E])(implicit trace: ZTraceElement): ZStream[Any, E, Nothing]
The stream that always halts with
cause.The stream that always halts with
cause.- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use failCause
- def paginateChunkM[R, E, A, S](s: => S)(f: (S) => ZIO[R, E, (Chunk[A], Option[S])])(implicit trace: ZTraceElement): ZStream[R, E, A]
Like unfoldChunkM, but allows the emission of values to end one step further than the unfolding of the state.
Like unfoldChunkM, 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.
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use paginateChunkZIO
- def paginateM[R, E, A, S](s: => S)(f: (S) => ZIO[R, E, (A, Option[S])])(implicit trace: ZTraceElement): ZStream[R, E, A]
Like unfoldM, but allows the emission of values to end one step further than the unfolding of the state.
Like unfoldM, 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.
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use paginateZIO
- def repeatEffect[R, E, A](fa: => ZIO[R, E, A])(implicit trace: ZTraceElement): ZStream[R, E, A]
Creates a stream from an effect producing a value of type
Awhich repeats forever.Creates a stream from an effect producing a value of type
Awhich repeats forever.- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use repeatZIO
- def repeatEffectChunk[R, E, A](fa: => ZIO[R, E, Chunk[A]])(implicit trace: ZTraceElement): ZStream[R, E, A]
Creates a stream from an effect producing chunks of
Avalues which repeats forever.Creates a stream from an effect producing chunks of
Avalues which repeats forever.- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use repeatZIOChunk
- def repeatEffectChunkOption[R, E, A](fa: => ZIO[R, Option[E], Chunk[A]])(implicit trace: ZTraceElement): ZStream[R, E, A]
Creates a stream from an effect producing chunks of
Avalues until it fails with None.Creates a stream from an effect producing chunks of
Avalues until it fails with None.- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use repeatZIOChunkOption
- def repeatEffectOption[R, E, A](fa: => ZIO[R, Option[E], A])(implicit trace: ZTraceElement): ZStream[R, E, A]
Creates a stream from an effect producing values of type
Auntil it fails with None.Creates a stream from an effect producing values of type
Auntil it fails with None.- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use repeatZIOOption
- def repeatEffectWith[R, E, A](effect: => ZIO[R, E, A], schedule: => Schedule[R, A, Any])(implicit trace: ZTraceElement): ZStream[R with Clock, 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.- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use repeatZIOWith
- def repeatWith[R, A](a: => A, schedule: Schedule[R, A, _])(implicit trace: ZTraceElement): ZStream[R with Clock, Nothing, A]
Repeats the value using the provided schedule.
Repeats the value using the provided schedule.
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use repeatWithSchedule
- def services[A, B, C, D](implicit arg0: zio.Tag[A], arg1: IsNotIntersection[A], arg2: zio.Tag[B], arg3: IsNotIntersection[B], arg4: zio.Tag[C], arg5: IsNotIntersection[C], arg6: zio.Tag[D], arg7: IsNotIntersection[D], trace: ZTraceElement): ZStream[A with B with C with D, Nothing, (A, B, C, D)]
Accesses the specified services in the environment of the effect.
Accesses the specified services in the environment of the effect.
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use service
- def services[A, B, C](implicit arg0: zio.Tag[A], arg1: IsNotIntersection[A], arg2: zio.Tag[B], arg3: IsNotIntersection[B], arg4: zio.Tag[C], arg5: IsNotIntersection[C], trace: ZTraceElement): ZStream[A with B with C, Nothing, (A, B, C)]
Accesses the specified services in the environment of the effect.
Accesses the specified services in the environment of the effect.
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use service
- def services[A, B](implicit arg0: zio.Tag[A], arg1: IsNotIntersection[A], arg2: zio.Tag[B], arg3: IsNotIntersection[B], trace: ZTraceElement): ZStream[A with B, Nothing, (A, B)]
Accesses the specified services in the environment of the effect.
Accesses the specified services in the environment of the effect.
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use service
- def unfoldChunkM[R, E, A, S](s: => S)(f: (S) => ZIO[R, E, Option[(Chunk[A], S)]])(implicit trace: ZTraceElement): ZStream[R, E, A]
Creates a stream by effectfully peeling off the "layers" of a value of type
SCreates a stream by effectfully peeling off the "layers" of a value of type
S- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use unfoldChunkZIO
- def unfoldM[R, E, A, S](s: => S)(f: (S) => ZIO[R, E, Option[(A, S)]])(implicit trace: ZTraceElement): ZStream[R, E, A]
Creates a stream by effectfully peeling off the "layers" of a value of type
SCreates a stream by effectfully peeling off the "layers" of a value of type
S- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use unfoldZIO
- def whenCaseM[R, E, A](a: => ZIO[R, E, A]): WhenCaseZIO[R, E, A]
Returns the resulting stream when the given
PartialFunctionis defined for the given effectful value, otherwise returns an empty stream.Returns the resulting stream when the given
PartialFunctionis defined for the given effectful value, otherwise returns an empty stream.- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use whenCaseZIO
- def whenM[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.
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use whenZIO
- def zipN[R, E, A, B, C, D, F](zStream1: ZStream[R, E, A], zStream2: ZStream[R, E, B], zStream3: ZStream[R, E, C], zStream4: ZStream[R, E, D])(f: (A, B, C, D) => F)(implicit trace: ZTraceElement): ZStream[R, E, F]
Returns an effect that executes the specified effects in parallel, combining their results with the specified
ffunction.Returns an effect that executes the specified effects in parallel, combining their results with the specified
ffunction. If any effect fails, then the other effects will be interrupted.- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use zip
- def zipN[R, E, A, B, C, D](zStream1: => ZStream[R, E, A], zStream2: => ZStream[R, E, B], zStream3: => ZStream[R, E, C])(f: (A, B, C) => D)(implicit trace: ZTraceElement): ZStream[R, E, D]
Zips with specified streams together with the specified function.
Zips with specified streams together with the specified function.
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use zip
- def zipN[R, E, A, B, C](zStream1: => ZStream[R, E, A], zStream2: => ZStream[R, E, B])(f: (A, B) => C)(implicit trace: ZTraceElement): ZStream[R, E, C]
Zips the specified streams together with the specified function.
Zips the specified streams together with the specified function.
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use zip