Skip to main content

nominal_api/conjure/objects/scout/layout/api/
single_tab_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 SingleTabV1 {
13    #[builder(into)]
14    #[serde(rename = "title")]
15    title: String,
16    #[builder(custom(type = super::Panel, convert = Box::new))]
17    #[serde(rename = "panel")]
18    panel: Box<super::Panel>,
19}
20impl SingleTabV1 {
21    /// Constructs a new instance of the type.
22    #[inline]
23    pub fn new(title: impl Into<String>, panel: super::Panel) -> Self {
24        Self::builder().title(title).panel(panel).build()
25    }
26    #[inline]
27    pub fn title(&self) -> &str {
28        &*self.title
29    }
30    #[inline]
31    pub fn panel(&self) -> &super::Panel {
32        &*self.panel
33    }
34}