#[derive(
Debug,
Clone,
conjure_object::serde::Serialize,
conjure_object::serde::Deserialize,
conjure_object::private::DeriveWith
)]
#[serde(crate = "conjure_object::serde")]
#[derive_with(PartialEq, Eq, PartialOrd, Ord, Hash)]
#[conjure_object::private::staged_builder::staged_builder]
#[builder(crate = conjure_object::private::staged_builder, update, inline)]
pub struct ScatterFitOptions {
#[builder(
default,
custom(
type = impl
Into<Option<super::DoubleConstant>>,
convert = |v|v.into().map(Box::new)
)
)]
#[serde(rename = "minX", skip_serializing_if = "Option::is_none", default)]
min_x: Option<Box<super::DoubleConstant>>,
#[builder(
default,
custom(
type = impl
Into<Option<super::DoubleConstant>>,
convert = |v|v.into().map(Box::new)
)
)]
#[serde(rename = "maxX", skip_serializing_if = "Option::is_none", default)]
max_x: Option<Box<super::DoubleConstant>>,
#[builder(
default,
custom(
type = impl
Into<Option<super::DoubleConstant>>,
convert = |v|v.into().map(Box::new)
)
)]
#[serde(rename = "minY", skip_serializing_if = "Option::is_none", default)]
min_y: Option<Box<super::DoubleConstant>>,
#[builder(
default,
custom(
type = impl
Into<Option<super::DoubleConstant>>,
convert = |v|v.into().map(Box::new)
)
)]
#[serde(rename = "maxY", skip_serializing_if = "Option::is_none", default)]
max_y: Option<Box<super::DoubleConstant>>,
}
impl ScatterFitOptions {
#[inline]
pub fn new() -> Self {
Self::builder().build()
}
#[inline]
pub fn min_x(&self) -> Option<&super::DoubleConstant> {
self.min_x.as_ref().map(|o| &**o)
}
#[inline]
pub fn max_x(&self) -> Option<&super::DoubleConstant> {
self.max_x.as_ref().map(|o| &**o)
}
#[inline]
pub fn min_y(&self) -> Option<&super::DoubleConstant> {
self.min_y.as_ref().map(|o| &**o)
}
#[inline]
pub fn max_y(&self) -> Option<&super::DoubleConstant> {
self.max_y.as_ref().map(|o| &**o)
}
}