ParallelRequest<T> class

A single step in a parallel request chain.

  • T is the adapted result type of this step.
  • adapter maps a fetched NostrEvent to a T.
  • filters describes the current request. You can compute them using captured values when you build the chain.
  • next is an optional builder that receives ALL adapted results of the current step (List

Constructors

ParallelRequest({required List<NostrFilter> filters, required T adapter(NostrEvent event), required ParallelRequestId<T> id, ParallelRequest next(List previousResults)?})
const

Properties

adapter → T Function(NostrEvent event)
final
filters → List<NostrFilter>
final
hashCode → int
The hash code for this object.
no setterinherited
id → ParallelRequestId<T>
final
next → ParallelRequest Function(List previousResults)?
Build the next request using the results of this step. If provided, it will be invoked with the full List
final
props → List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
stringify → bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
then<U>(ParallelRequest<U> buildNext(List<T> previousResults)) → ParallelRequest<T>
Fluent helper to attach a next step with full type inference.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited