Instead of Response::models being an async fn -> Result<Vec<T>, E> it should return a type implementing Stream<Item = Result<T, E>> and IntoFuture<Output = Result<Vec<T>, E>>. This allows for lazy deserializing the response and potentially skip the (often unused) Vec buffer.
Inspiration: https://github.com/abdolence/axum-streams-rs
Instead of
Response::modelsbeing anasync fn -> Result<Vec<T>, E>it should return a type implementingStream<Item = Result<T, E>>andIntoFuture<Output = Result<Vec<T>, E>>. This allows for lazy deserializing the response and potentially skip the (often unused)Vecbuffer.Inspiration: https://github.com/abdolence/axum-streams-rs