Skip to content

AsyncIterator

1 min read

No import is needed.

Read the usage guide for examples and common tasks. This reference lists the public declarations for this part of the library. See Reading API signatures for parameter and result notation.

AsyncIterator

A cursor whose next value may require asynchronous work. Close it when finished.

public interface AsyncIterator<T>

next

Returns the next value, or None when the sequence has ended.

async unique fun next(): Option<T>

close

Ends iteration and releases resources held by the cursor.

unique fun close(): void