Hyperlinkv0.8.0-beta.28

effect

Channel151

Constructors

acquireReleaseconstAcquires a resource, emits the acquired value as a single channel element, and registers release in the channel scope.acquireUseReleaseconstAcquires a resource, uses it to build a Channel, and guarantees that release runs with the channel's Exit when the channel completes, fails, or is interrupted.callbackconstCreates a Channel that interacts with a callback function using a queue.callbackArrayconstCreates a Channel that interacts with a callback function using a queue, emitting arrays.dieconstConstructs a channel that fails immediately with the specified defect.drainconstCreates a new channel that consumes all output from the source channel but emits nothing, preserving only the completion value.emptyconstRepresents a Channel that emits no elements.endconstCreates a Channel that immediately ends with the specified value.endSyncconstCreates a Channel that immediately ends with the lazily evaluated value.failconstConstructs a channel that fails immediately with the specified error.failCauseconstConstructs a channel that fails immediately with the specified Cause.failCauseSyncconstConstructs a channel that fails immediately with the specified lazily evaluated Cause.failSyncconstConstructs a channel that fails immediately with the specified lazily evaluated error.flattenconstFlattens a channel of channels.fromArrayconstCreates a Channel that emits all elements from an array.fromAsyncIterableconstCreates a channel that pulls values from an AsyncIterable.fromAsyncIterableArrayconstCreates a channel from an AsyncIterable, emitting each yielded value as a single-element non-empty array.fromChunkconstCreates a Channel that emits all elements from a chunk.fromEffectconstUses an effect to write a single value to the channel.fromEffectDoneconstCreates a channel that evaluates an effect and uses its successful value as the channel's done value without emitting any output elements.fromEffectDrainconstUses an effect and discards its result.fromEffectTakeconstCreates a channel from an effect that produces a Take.fromIterableconstCreates a Channel that emits all elements from an iterable.fromIterableArrayconstCreates a Channel that emits arrays of elements from an iterable.fromIteratorconstCreates a Channel from an iterator.fromIteratorArrayconstCreates a Channel from an iterator that emits arrays of elements.fromPubSubconstCreates a channel from a PubSub that outputs individual values.fromPubSubArrayconstCreates a channel from a PubSub that outputs arrays of values.fromPubSubTakeconstSubscribes to a PubSub of Take values and exposes them as a channel.fromPullconstCreates a Channel from an Effect that produces a Pull.fromQueueconstCreates a channel from a queue.fromQueueArrayconstCreates a channel from a queue that emits arrays of elements.fromScheduleconstCreates a Channel from a Schedule.fromSubscriptionconstCreates a channel from a PubSub subscription.fromSubscriptionArrayconstCreates a channel from a PubSub subscription that outputs arrays of values.fromTransformconstCreates a Channel from a transformation function that operates on upstream pulls.fromTransformBracketconstCreates a Channel from a transformation function that operates on upstream pulls, but also provides a forked scope that closes when the resulting Channel completes.identityconstCreates a channel that forwards upstream input elements, input errors, and the upstream done value unchanged.neverconstRepresents a Channel that never completes.succeedconstCreates a Channel that emits a single value and then ends.suspendconstCreates a Channel that lazily evaluates to another channel.syncconstCreates a Channel that emits a single value computed by a lazy evaluation.transformPullconstTransforms a Channel by applying a function to its Pull implementation.unwrapconstConstructs a Channel from a scoped effect that will result in a Channel if successful.

Services

Models

Type Ids

Guards

Filtering

Sequencing

combineconstCombines two channels with a stateful pull function.concatconstConcatenates this channel with another channel, so that the second channel starts emitting values after the first channel has completed.concatWithconstConcatenates this channel with another channel created from the terminal value of this channel.embedInputconstRuns an input handler against the upstream pull while the wrapped channel runs without receiving upstream input directly.flatMapconstMaps each output element to a channel and flattens the child channel outputs.mapconstMaps the output of this channel using the specified function.mapAccumconstMaps over a channel statefully with an accumulator, where each element can produce multiple output values.mapDoneconstMaps the done value of this channel using the specified function.mapDoneEffectconstMaps the done value of this channel using the specified effectful function.mapEffectconstMaps each output element with an effectful function, preserving the source channel's done value.mapInputconstReturns a new channel which is the same as this one but applies the given function to the input channel’s input elements.mapInputErrorconstReturns a new channel which is the same as this one but applies the given function to the input errors.orElseIfEmptyconstRuns a fallback channel if this channel completes without emitting any output elements.pipeToconstReturns a new channel that pipes the output of this channel into the specified channel.pipeToOrFailconstReturns a new channel that pipes the output of this channel into the specified channel and preserves this channel's failures without providing them to the other channel for observation.scanconstTransforms a channel statefully by scanning over its output with an accumulator function.scanEffectconstTransforms a channel statefully by scanning over its output with an effectful accumulator function.scheduleconstRuns a schedule step for each output element while preserving the emitted elements.switchMapconstMaps each output element to a channel and emits values from the most recent active child channels.tapconstApplies a side effect function to each output element of the channel, returning a new channel that emits the same elements.

Destructors

Buffering

Combining

Constants

Do Notation

Error Handling

catchCauseconstCatches any cause of failure from the channel and allows recovery by creating a new channel based on the caught cause.catchCauseFilterconstRecovers from channel failures whose full Cause is selected by a Filter.catchCauseIfconstCatches causes of failure that match a specific filter, allowing conditional error recovery based on the type of failure.catchFilterconstRecovers from typed channel errors selected by a Filter.catchIfconstRecovers from typed channel errors that match a predicate or refinement.catchReasonconstCatches a specific reason within a tagged error.catchReasonsconstCatches multiple reasons within a tagged error using an object of handlers.catchTagconstRecovers from tagged channel errors whose _tag matches one or more tags.ignoreconstIgnores all errors in the channel, converting them to an empty channel.ignoreCauseconstIgnores all errors in the channel including defects, converting them to an empty channel.mapErrorconstReturns a new channel, which is the same as this one, except the failure value of the returned channel is created by applying the specified function to the failure value of this channel.onErrorconstAttaches a finalizer that runs only when the channel exits with failure.orDieconstConverts all errors in the channel to defects (unrecoverable failures).retryconstReturns a new channel that retries this channel according to the specified schedule whenever it fails.tapCauseconstRuns an effect with the full failure Cause when the channel fails, then fails the returned channel with the original cause.tapErrorconstRuns an effect when the channel fails with a typed error, then preserves the original channel failure.unwrapReasonconstPromotes nested reason errors into the channel error, replacing the parent error.

Execution

Hooks

Interruption

Repetition

Resource Management

String Manipulation

Tracing

Transforming