#[derive(
Debug,
Clone,
conjure_object::serde::Serialize,
conjure_object::serde::Deserialize,
PartialEq,
Eq,
PartialOrd,
Ord,
Hash
)]
#[serde(crate = "conjure_object::serde")]
#[conjure_object::private::staged_builder::staged_builder]
#[builder(crate = conjure_object::private::staged_builder, update, inline)]
pub struct FloatingLegendConfig {
#[builder(default, into)]
#[serde(rename = "hidden", skip_serializing_if = "Option::is_none", default)]
hidden: Option<bool>,
#[builder(custom(type = super::FloatingLegend, convert = Box::new))]
#[serde(rename = "legend")]
legend: Box<super::FloatingLegend>,
}
impl FloatingLegendConfig {
#[inline]
pub fn new(legend: super::FloatingLegend) -> Self {
Self::builder().legend(legend).build()
}
#[inline]
pub fn hidden(&self) -> Option<bool> {
self.hidden.as_ref().map(|o| *o)
}
#[inline]
pub fn legend(&self) -> &super::FloatingLegend {
&*self.legend
}
}