nominal_api/conjure/objects/scout/chartdefinition/api/
per_row_floating_legends.rs1#[derive(
3 Debug,
4 Clone,
5 conjure_object::serde::Serialize,
6 conjure_object::serde::Deserialize,
7 PartialEq,
8 Eq,
9 PartialOrd,
10 Ord,
11 Hash
12)]
13#[serde(crate = "conjure_object::serde")]
14#[conjure_object::private::staged_builder::staged_builder]
15#[builder(crate = conjure_object::private::staged_builder, update, inline)]
16pub struct PerRowFloatingLegends {
17 #[builder(
18 default,
19 custom(
20 type = impl
21 Into<Option<super::FloatingLegendPosition>>,
22 convert = |v|v.into().map(Box::new)
23 )
24 )]
25 #[serde(rename = "position", skip_serializing_if = "Option::is_none", default)]
26 position: Option<Box<super::FloatingLegendPosition>>,
27}
28impl PerRowFloatingLegends {
29 #[inline]
31 pub fn new() -> Self {
32 Self::builder().build()
33 }
34 #[inline]
36 pub fn position(&self) -> Option<&super::FloatingLegendPosition> {
37 self.position.as_ref().map(|o| &**o)
38 }
39}