package @rimbu/stream/async-custom
The @rimbu/stream/async-custom entry exposes custom constructors, utilities, async fast‑iterator support and internal AsyncStream implementations used by the main async stream API in @rimbu/stream/async.
Use it only when you need low‑level integration with async fast iterators or to build specialized async stream sources; for normal async pipelines prefer @rimbu/stream/async.
Interfaces
| Name | Description |
|---|---|
AsyncStreamConstructors | An interface describing all factory functions used to create AsyncStream instances. Implementations of this interface are exposed via the global AsyncStream value and the @rimbu/stream/async-custom sub-package. |
Classes
| Name | Description |
|---|---|
AsyncAppendIterator | undocumented |
AsyncCollectIterator | undocumented |
AsyncConcatIterator | undocumented |
AsyncDropIterator | undocumented |
AsyncDropWhileIterator | undocumented |
AsyncFastIteratorBase | Base class for asynchronous fast iterators that implements next in terms of fastNext. Subclasses only need to implement the fastNext method. |
AsyncFilterIterator | undocumented |
AsyncFilterPureIterator | undocumented |
AsyncFromStream | undocumented |
AsyncIndexedIterator | undocumented |
AsyncMapIterator | undocumented |
AsyncMapPureIterator | undocumented |
AsyncOfIterator | undocumented |
AsyncOfStream | undocumented |
AsyncPrependIterator | undocumented |
AsyncReduceIterator | undocumented |
AsyncRepeatIterator | undocumented |
AsyncStreamBase | undocumented |
AsyncTakeIterator | undocumented |
AsyncTransformerFastIterator | undocumented |
AsyncTransformerStream | undocumented |
AsyncUnfoldIterator | undocumented |
AsyncZipAllWithItererator | undocumented |
AsyncZipWithIterator | undocumented |
FromAsyncIterator | undocumented |
FromIterator | undocumented |
FromPromise | undocumented |
FromResource | An AsyncStream implementation that manages an external resource while streaming values. The resource is opened on first iteration and closed when the stream completes or is disposed. |
FromResourceIterator | undocumented |
FromSource | An AsyncStream implementation that wraps an arbitrary AsyncStreamSource. Used internally by fromAsyncStreamSource but also available for advanced use cases. |
Functions
asyncStreamSourceToIterator
Converts any AsyncStreamSource into an AsyncFastIterator. This is the low-level entry point used by fromAsyncStreamSource.
asyncStreamSourceToIteratorAsyncStreamSource into an AsyncFastIterator. This is the low-level entry point used by fromAsyncStreamSource.Definition
export declare function asyncStreamSourceToIterator<T>(source: AsyncStreamSource<T>, close?: () => MaybePromise<void>): AsyncFastIterator<T>;
Type parameters
| Name | Description |
|---|---|
| T | the element type |
Parameters
| Name | Type | Description |
|---|---|---|
source | AsyncStreamSource<T> | the async stream source to convert |
close | () => MaybePromise<void> | optional callback that will be invoked when the iterator is closed |
closeIters
undocumented
closeItersisAsyncFastIterator
Returns true if the given iterator implements the AsyncFastIterator interface.
isAsyncFastIteratoriterator implements the AsyncFastIterator interface.isAsyncStream
undocumented
isAsyncStreamisEmptyAsyncStreamSourceInstance
Returns true if the given async stream source is known to be empty. If this function returns false, the source may still be empty; it is simply not known.
isEmptyAsyncStreamSourceInstanceConstants
| Name | Description |
|---|---|
| AsyncStreamConstructorsImpl | Default implementation of the AsyncStreamConstructors interface. This instance backs the exported AsyncStream value. |
| emptyAsyncFastIterator | An AsyncFastIterator that is already exhausted and never yields values. Its fastNext method always resolves to the provided fallback value. |
| emptyAsyncStream | A shared empty AsyncStream instance used throughout the async stream implementation. |
| fixedDoneAsyncIteratorResult | A frozen IteratorResult that represents the completed asynchronous iterator state. This value is reused to avoid repeated allocations in async iterator implementations. |
| fromAsyncStreamSource | Converts any AsyncStreamSource into a concrete AsyncStream implementation. |