Skip to main content

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

1/// The FE should try to pass in inputs in the order in which they should be
2/// evaluated for optimization's sake. Alternatively, we can let the user select
3/// preconditions which they know to be cheaper to compute, which we will evaluate
4/// first.
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 IntersectRanges {
17    #[builder(default, list(item(type = super::RangeSeries)))]
18    #[serde(rename = "inputs", skip_serializing_if = "Vec::is_empty", default)]
19    inputs: Vec<super::RangeSeries>,
20}
21impl IntersectRanges {
22    /// Constructs a new instance of the type.
23    #[inline]
24    pub fn new() -> Self {
25        Self::builder().build()
26    }
27    #[inline]
28    pub fn inputs(&self) -> &[super::RangeSeries] {
29        &*self.inputs
30    }
31}