Skip to content

Make ListBody<T> lazily deserializable #2310

@vilgotf

Description

@vilgotf

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    c-httpAffects the http cratet-featureAddition of a new feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions