use axum::response::IntoResponse;
use tokio::io::AsyncRead;
use crate::FlowFile;
impl<R: AsyncRead + Unpin + Send + 'static> IntoResponse for FlowFile<R> {
fn into_response(mut self) -> axum::response::Response {
let (w, body) = super::make_response_stream(8192);
tokio::spawn(async move {
let _ = self.serialize_into(w).await;
});
body.into_response()
}
}