Skip to main content

qubit_http/response/
http_byte_stream.rs

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