Skip to main content

nominal_api_conjure/conjure/objects/scout/compute/api/
intersect_ranges.rs

1/// Produces the intersection of the input ranges: the ranges of time covered by
2/// every input. For best performance, pass inputs in the order in which they
3/// should be evaluated, listing the ranges that are cheapest to compute first.
4#[derive(
5    Debug,
6    Clone,
7    conjure_object::serde::Serialize,
8    conjure_object::serde::Deserialize,
9    conjure_object::private::DeriveWith
10)]
11#[serde(crate = "conjure_object::serde")]
12#[derive_with(PartialEq, Eq, PartialOrd, Ord, Hash)]
13#[conjure_object::private::staged_builder::staged_builder]
14#[builder(crate = conjure_object::private::staged_builder, update, inline)]
15pub struct IntersectRanges {
16    #[builder(default, list(item(type = super::RangeSeries)))]
17    #[serde(rename = "inputs", skip_serializing_if = "Vec::is_empty", default)]
18    inputs: Vec<super::RangeSeries>,
19}
20impl IntersectRanges {
21    /// Constructs a new instance of the type.
22    #[inline]
23    pub fn new() -> Self {
24        Self::builder().build()
25    }
26    #[inline]
27    pub fn inputs(&self) -> &[super::RangeSeries] {
28        &*self.inputs
29    }
30}