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

x/rimbu/stream/async-custom/index.ts>FromResourceIterator

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Go to Latest
class FromResourceIterator
Re-export
import { FromResourceIterator } from "https://deno.land/x/rimbu@1.0.3/stream/async-custom/index.ts";

Constructors

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

Properties

optional
iterator: AsyncFastIterator<T>
optional
resource: R

Methods

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