Skip to main content

nominal_api/conjure/objects/scout/compute/api/
combined_frame.rs

1/// Combines multiple frames into a single frame by taking the union of all points
2/// from each input (akin to SQL {@code UNION ALL}). Duplicate timestamps are preserved
3/// rather than merged; callers that need aggregation should wrap the selected series
4/// downstream.
5#[derive(
6    Debug,
7    Clone,
8    conjure_object::serde::Serialize,
9    conjure_object::serde::Deserialize,
10    conjure_object::private::DeriveWith
11)]
12#[serde(crate = "conjure_object::serde")]
13#[derive_with(PartialEq, Eq, PartialOrd, Ord, Hash)]
14#[conjure_object::private::staged_builder::staged_builder]
15#[builder(crate = conjure_object::private::staged_builder, update, inline)]
16pub struct CombinedFrame {
17    #[builder(default, list(item(type = super::DataFrame)))]
18    #[serde(rename = "inputs", skip_serializing_if = "Vec::is_empty", default)]
19    inputs: Vec<super::DataFrame>,
20}
21impl CombinedFrame {
22    /// Constructs a new instance of the type.
23    #[inline]
24    pub fn new() -> Self {
25        Self::builder().build()
26    }
27    /// The frames to combine.
28    #[inline]
29    pub fn inputs(&self) -> &[super::DataFrame] {
30        &*self.inputs
31    }
32}