The signature of ...Builder.flatMap(Function<? super T, ? extends PublisherBuilder<? extends S>> mapper) accepts PublisherBuilder. However, if I want to represent this method as a Stage.FlatMap to be used with buildRs(ReactiveStreamsEngine) via engine.buildPublisher(Graph), Stage.FlatMap requires a Function<T, Graph>.
How do I supposedly turn an arbitrary PublisherBuilder into a Graph? Should I create a mock engine so that when calling PublisherBuilder.buildRs(ReactiveStreamsEngine), it captures the Graph object sent to its buildPublisher(Graph)?
As you noted in #140, a compliant implementation of PublisherBuilder must also implement ToGraphable so you can just cast to ToGraphable and call toGraph().
The signature of
...Builder.flatMap(Function<? super T, ? extends PublisherBuilder<? extends S>> mapper)
acceptsPublisherBuilder
. However, if I want to represent this method as aStage.FlatMap
to be used withbuildRs(ReactiveStreamsEngine)
viaengine.buildPublisher(Graph)
,Stage.FlatMap
requires aFunction<T, Graph>
.How do I supposedly turn an arbitrary
PublisherBuilder
into aGraph
? Should I create a mock engine so that when callingPublisherBuilder.buildRs(ReactiveStreamsEngine)
, it captures theGraph
object sent to itsbuildPublisher(Graph)
?