Skip to main content
Module

x/rimbu/core/mod.ts>AsyncFastIterator

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Latest
interface AsyncFastIterator
implements AsyncIterator<T>
Re-export
import { type AsyncFastIterator } from "https://deno.land/x/rimbu@1.2.1/core/mod.ts";

An asynchronous iterator that extends the default AsyncIterator interface with methods for improved performance.

Methods

fastNext(): MaybePromise<T | undefined>

Returns the next iterator value asynchronously, or the given otherwise AsyncOptLazy value instead.

fastNext<O>(otherwise: AsyncOptLazy<O>): MaybePromise<T | O>

Returns the next iterator value asynchronously, or the given otherwise AsyncOptLazy value instead.

next(): Promise<IteratorResult<T>>

Returns a promise resolving to the next IteratorResult.

fastNext(): MaybePromise<T | undefined>

Returns the next iterator value asynchronously, or the given otherwise AsyncOptLazy value instead.

fastNext<O>(otherwise: AsyncOptLazy<O>): MaybePromise<T | O>

Returns the next iterator value asynchronously, or the given otherwise AsyncOptLazy value instead.

next(): Promise<IteratorResult<T>>

Returns a promise resolving to the next IteratorResult.