Skip to main content

nominal_api_conjure/conjure/objects/scout/compute/resolved/api/
alignment_configuration.rs

1#[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 AlignmentConfiguration {
16    #[builder(custom(type = super::FillStrategy, convert = Box::new))]
17    #[serde(rename = "fillStrategy")]
18    fill_strategy: Box<super::FillStrategy>,
19    #[builder(custom(type = super::Alignment, convert = Box::new))]
20    #[serde(rename = "alignment")]
21    alignment: Box<super::Alignment>,
22}
23impl AlignmentConfiguration {
24    /// Constructs a new instance of the type.
25    #[inline]
26    pub fn new(fill_strategy: super::FillStrategy, alignment: super::Alignment) -> Self {
27        Self::builder().fill_strategy(fill_strategy).alignment(alignment).build()
28    }
29    #[inline]
30    pub fn fill_strategy(&self) -> &super::FillStrategy {
31        &*self.fill_strategy
32    }
33    #[inline]
34    pub fn alignment(&self) -> &super::Alignment {
35        &*self.alignment
36    }
37}