Skip to main content

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