GrpcFilteredCheckpointStream
GrpcFilteredCheckpointStream
class GrpcFilteredCheckpointStream
A stream of filtered checkpoints returned by [GrpcClient::checkpoints_stream_filtered].
Call next in a loop to receive items; it returns None once the stream is exhausted
or cancel has been called.
cancel()
func cancel()
Cancel the stream, dropping the connection and unblocking a pending next.
Idempotent, and safe to call while next is pending — the pending call drops the
connection on its way out.
Named cancel rather than close because a close method collides with the
disposal method uniffi generates for objects in some languages.
isCanceled()
func isCanceled() -> Bool
Whether the stream has been canceled.
next()
func next() async throws -> GrpcCheckpointStreamItem?
Get the next item from the stream.
Returns None once the stream is exhausted or has been canceled. Concurrent calls
are serialized; there is no ordering guarantee between them.
An error from the connection or the server ends the stream: there is no reconnect,
so every later call returns None, and a caller that wants to resume must open a
new stream from the last sequence number it received. An error converting a single
item, such as a BCS decode failure, only affects that item; the next call continues
with the following one.