Skip to main content

pagesift_api/types/
progress.rs

1//! Internal early Markdown notification for opt-in streaming responses.
2use tokio::sync::broadcast;
3
4#[derive(Clone, Debug)]
5pub struct MarkdownPreview {
6    pub url: String,
7    pub markdown: String,
8    pub truncated: bool,
9}
10
11#[derive(Clone, Debug)]
12pub struct MarkdownProgress(pub broadcast::Sender<MarkdownPreview>);
13
14impl PartialEq for MarkdownProgress {
15    fn eq(&self, other: &Self) -> bool {
16        self.0.same_channel(&other.0)
17    }
18}