openpine_vm/
output_mode.rs

1/// Controls how series graph data is produced during execution.
2///
3/// The output mode determines whether native functions (e.g. `plot()`) write
4/// directly to the [`Chart`](crate::visuals::Chart) or emit
5/// [`DrawEvent`](crate::DrawEvent) variants into the event stream.
6#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]
7pub enum OutputMode {
8    /// Native functions update the chart's series graphs directly.
9    /// No [`DrawEvent`](crate::DrawEvent) events are emitted.
10    /// This is the default mode, compatible with existing behavior.
11    #[default]
12    Chart,
13    /// Native functions emit [`DrawEvent`](crate::DrawEvent) events instead
14    /// of updating the chart's series graphs.
15    /// Use this mode for streaming consumption without maintaining chart state.
16    Stream,
17}