Skip to main content

nominal_api/conjure/objects/scout/layout/api/
split_panel_v1.rs

1#[derive(
2    Debug,
3    Clone,
4    conjure_object::serde::Serialize,
5    conjure_object::serde::Deserialize,
6    conjure_object::private::DeriveWith
7)]
8#[serde(crate = "conjure_object::serde")]
9#[derive_with(PartialEq, Eq, PartialOrd, Ord, Hash)]
10#[conjure_object::private::staged_builder::staged_builder]
11#[builder(crate = conjure_object::private::staged_builder, update, inline)]
12pub struct SplitPanelV1 {
13    #[serde(rename = "id")]
14    id: super::PanelId,
15    #[serde(rename = "orientation")]
16    orientation: super::SplitPanelOrientation,
17    #[builder(custom(type = super::Panel, convert = Box::new))]
18    #[serde(rename = "sideOne")]
19    side_one: Box<super::Panel>,
20    #[builder(custom(type = super::Panel, convert = Box::new))]
21    #[serde(rename = "sideTwo")]
22    side_two: Box<super::Panel>,
23}
24impl SplitPanelV1 {
25    #[inline]
26    pub fn id(&self) -> &super::PanelId {
27        &self.id
28    }
29    #[inline]
30    pub fn orientation(&self) -> &super::SplitPanelOrientation {
31        &self.orientation
32    }
33    #[inline]
34    pub fn side_one(&self) -> &super::Panel {
35        &*self.side_one
36    }
37    #[inline]
38    pub fn side_two(&self) -> &super::Panel {
39        &*self.side_two
40    }
41}