nominal_api/conjure/objects/scout/compute/api/
cartesian_unit_result.rs1#[derive(
2 Debug,
3 Clone,
4 conjure_object::serde::Serialize,
5 conjure_object::serde::Deserialize,
6 PartialEq,
7 Eq,
8 PartialOrd,
9 Ord,
10 Hash
11)]
12#[serde(crate = "conjure_object::serde")]
13#[conjure_object::private::staged_builder::staged_builder]
14#[builder(crate = conjure_object::private::staged_builder, update, inline)]
15pub struct CartesianUnitResult {
16 #[builder(custom(type = super::UnitResult, convert = Box::new))]
17 #[serde(rename = "x")]
18 x: Box<super::UnitResult>,
19 #[builder(custom(type = super::UnitResult, convert = Box::new))]
20 #[serde(rename = "y")]
21 y: Box<super::UnitResult>,
22}
23impl CartesianUnitResult {
24 #[inline]
26 pub fn new(x: super::UnitResult, y: super::UnitResult) -> Self {
27 Self::builder().x(x).y(y).build()
28 }
29 #[inline]
30 pub fn x(&self) -> &super::UnitResult {
31 &*self.x
32 }
33 #[inline]
34 pub fn y(&self) -> &super::UnitResult {
35 &*self.y
36 }
37}