Skip to main content

qubit_http/sse/
sse_event_stream.rs

1/*******************************************************************************
2 *
3 *    Copyright (c) 2025 - 2026.
4 *    Haixing Hu, Qubit Co. Ltd.
5 *
6 *    All rights reserved.
7 *
8 ******************************************************************************/
9//! Pin-boxed stream of [`SseEvent`](crate::sse::SseEvent) or [`HttpError`](crate::HttpError).
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_event::SseEvent;
22
23/// Pin-boxed stream of parsed [`SseEvent`] or [`HttpError`](crate::HttpError).
24pub type SseEventStream = Pin<Box<dyn Stream<Item = HttpResult<SseEvent>> + Send>>;