Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/rimbu/stream/async-custom/async-fast-iterator-base.ts>FromResourceIterator

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Latest
class FromResourceIterator
import { FromResourceIterator } from "https://deno.land/x/rimbu@1.2.1/stream/async-custom/async-fast-iterator-base.ts";

Constructors

new
FromResourceIterator(
open: () => MaybePromise<R>,
createSource: (resource: R) => MaybePromise<AsyncStreamSource<T>>,
close: ((resource: R) => MaybePromise<void>) | undefined,
asyncStreamSourceHelpers: AsyncStreamSourceHelpers,
)

Properties

iterator: AsyncFastIterator<T> | undefined
resource: R | undefined

Methods

fastNext<O>(otherwise?: AsyncOptLazy<O>): Promise<T | O>