Skip to main content

qubit_http/sse/
sse_chunk_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//! Stream type for [`SseChunk`](crate::sse::SseChunk) items.
11//!
12
13use std::pin::Pin;
14
15use futures_util::Stream;
16
17use crate::HttpResult;
18
19use super::sse_chunk::SseChunk;
20
21/// Pin-boxed stream of [`SseChunk`] or [`HttpError`](crate::HttpError).
22pub type SseChunkStream<T> = Pin<Box<dyn Stream<Item = HttpResult<SseChunk<T>>> + Send>>;