Skip to main content

qubit_progress/reporter/
progress_reporter.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 ******************************************************************************/
10use crate::model::ProgressEvent;
11
12/// Receives immutable progress events.
13pub trait ProgressReporter: Send + Sync {
14    /// Reports one progress event.
15    ///
16    /// # Parameters
17    ///
18    /// * `event` - Immutable progress event to report.
19    ///
20    /// # Panics
21    ///
22    /// Reporter implementations may panic if their output sink fails. Callers
23    /// decide whether reporter panics are propagated or isolated.
24    fn report(&self, event: &ProgressEvent);
25}