Skip to content

ConditionalSendStream to match ConditionalSendFuture #22093

@nuzzles

Description

@nuzzles

What problem does this solve or what need does it fill?

Web and native stream interoperability

What solution would you like?

Literally

pub trait ConditionalSendStream: Stream + ConditionalSend {}

impl<T: Stream + ConditionalSend> ConditionalSendStream for T {}

What alternative(s) have you considered?

Writing it myself, which I did

Additional context

Stream support on web seems pretty important, especially since there's new work going into async, and streams are basically async iterators.

My specific use-case is to stream data from an AI via an LLM serving SSE content over http, and have that work on WASM.

Here is my implementation in my own crate: https://github.com/loopystudios/bevy_async_task/pull/16/changes#diff-b1a35a68f14e696205874893c07fd24fdb88882b47c23cc0e0c80a30c7d53759R37-R49

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-AssetsLoad files from disk to use for things like images, models, and soundsA-TasksTools for parallel and async workC-FeatureA new feature, making something new possibleD-AsyncDeals with asynchronous abstractionsD-StraightforwardSimple bug fixes and API improvements, docs, test and examplesS-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions