qubit_http/sse/sse_chunk_stream.rs
1/*******************************************************************************
2 *
3 * Copyright (c) 2025 - 2026.
4 * Haixing Hu, Qubit Co. Ltd.
5 *
6 * All rights reserved.
7 *
8 ******************************************************************************/
9//! Stream type for [`SseChunk`](crate::sse::SseChunk) items.
10//!
11//! # Author
12//!
13//! Haixing Hu
14
15use std::pin::Pin;
16
17use futures_util::Stream;
18
19use crate::HttpResult;
20
21use super::sse_chunk::SseChunk;
22
23/// Pin-boxed stream of [`SseChunk`] or [`HttpError`](crate::HttpError).
24pub type SseChunkStream<T> = Pin<Box<dyn Stream<Item = HttpResult<SseChunk<T>>> + Send>>;