Where Action and Error are enums defined in the same crate.
The general flow of the function is that it checks for the presence of some data in a data store, which is a regular old Future, and then returns either a stream containing a single item (if the data was present) or an empty stream. So the value returned by the function needs to be a stream, but the result of a future is needed to determine what the returned stream should contain.
I’m confused by the error I’m getting, which implies that ActionStream does not implement Future, but streams do implement Future, so there is some subtlety here that I’m not able to parse out of the long, confusing trait bounds shown in the compiler output. Any help would be appreciated!