@mcc It feels like the easiest way to implement some custom borrowing strategy would be to "just" return a custom type that implements the `Responder` trait, and move most of the logic into that, at least as long as you don't need a complicated self-referential state machine to produce the output...
'Έλλεν Εμίλια Ά.ζ.
@fogti@chaos.social
Posts
-
*rubbing eyes* Anyone use "Rocket"? -
*rubbing eyes* Anyone use "Rocket"?@mcc It seems that the `Stream` part (https://api.rocket.rs/v0.5/rocket/response/stream/) of the return type to be returned is actually supposed to be a type utilizing the `futures::stream::Stream` trait (https://docs.rs/futures/0.3.31/futures/stream/trait.Stream.html) internally, and all the wrapper types mentioned are basically "convenience wrappers" which implement the stream upon something else, and futhermore wrap it into a `rocket::responder::Responder` (https://api.rocket.rs/v0.5/rocket/response/trait.Responder), which furthermore also does the error handling, like a monad...