qubit_http/response/http_byte_stream.rs
1/*******************************************************************************
2 *
3 * Copyright (c) 2025 - 2026.
4 * Haixing Hu, Qubit Co. Ltd.
5 *
6 * All rights reserved.
7 *
8 ******************************************************************************/
9//! Byte stream alias for HTTP response body streams.
10
11use std::pin::Pin;
12
13use bytes::Bytes;
14use futures_util::Stream;
15
16use crate::HttpResult;
17
18/// Pin-boxed async stream of body chunks or errors, used by [`crate::HttpResponse`].
19pub type HttpByteStream = Pin<Box<dyn Stream<Item = HttpResult<Bytes>> + Send>>;