n0-computer / quic-rpc

A streaming rpc system based on quic
Other
89 stars 12 forks source link

Add TryServerStreaming interaction pattern #71

Closed rklaehn closed 5 months ago

rklaehn commented 5 months ago

also reorganize this into a separate pattern dir.

I think we need to separate out the patterns more. E.g. in some cases it would be useful if you don't have a fn that returns a stream but get a fn that gets a sink.

In any case, this is the attempt to do an interaction pattern that is more friendly to the case where the stream creation itself is async and fallible, and the stream contains results.

For usage, see the example in the try.rs test.