Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/rimbu/core/mod.ts>AsyncFastIterator

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Go to Latest
interface AsyncFastIterator
implements AsyncIterator<T>
Re-export
import { type AsyncFastIterator } from "https://deno.land/x/rimbu@1.2.0/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.