The seam between Pixir.Provider and the network, so the SSE parsing can be tested
without real HTTP. A transport streams an HTTP request and invokes fun for each
low-level chunk — mirroring Finch.stream/5's shape:
fun.({:status, integer}, acc)
fun.({:headers, [{k, v}]}, acc)
fun.({:data, binary}, acc)Returns {:ok, acc} or {:error, reason}. Pixir.Provider also accepts a plain
3-arity function in place of a module implementing this behaviour.
Summary
Types
Callbacks
@callback stream(http_request(), acc, (chunk(), acc -> acc)) :: {:ok, acc} | {:error, term()} when acc: term()