#[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 LocatorWithDelimiter {
#[builder(custom(type = super::Locator, convert = Box::new))]
#[serde(rename = "locator")]
locator: Box<super::Locator>,
#[builder(default, into)]
#[serde(rename = "delimiter", skip_serializing_if = "Option::is_none", default)]
delimiter: Option<String>,
}
impl LocatorWithDelimiter {
#[inline]
pub fn new(locator: super::Locator) -> Self {
Self::builder().locator(locator).build()
}
#[inline]
pub fn locator(&self) -> &super::Locator {
&*self.locator
}
#[inline]
pub fn delimiter(&self) -> Option<&str> {
self.delimiter.as_ref().map(|o| &**o)
}
}