import { AsyncIterator } from "https://deno.land/x/ldkit@v0.6.3/library/asynciterator.ts";
Tries to read the next item from the iterator.
This is the main method for reading the iterator in on-demand mode,
where new items are only created when needed by consumers.
If no items are currently available, this methods returns null
.
The module:asynciterator.event:readable event
will then signal when new items might be ready.
To read all items from the iterator,
switch to flow mode by subscribing
to the module:asynciterator.event:data event.
When in flow mode, do not use the read
method.