*rubbing eyes* Anyone use "Rocket"?
The worst/most Ruby-like thing about Rocket is when you return a value from a Route function, you just kinda return… whatever datatype you want, and Rocket figures it out.
Unless it doesn't, and you have *no* idea what to return.
For a string, you return a String.
What do I return for bytes? It's not a string, it's a &[u8; 1335895] and it's not valid UTF-8. Do I return a rocket::response::ByteStream? That seems to be the correct answer but doesn't work
![error[E0277]: the trait bound `&[u8; 1335895]: Stream` is not satisfied
--> server/src/pages.rs:33:1
|
33 | pub async fn get_wasm_2() -> Result<(ContentType, ByteStream![&'static [u8]]), Status> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Stream` is not implemented for `&[u8; 1335895]`
|](https://files.mastodon.social/media_attachments/files/116/037/053/618/528/032/original/a8303735151d86c8.png)