crate::ix!();
#[derive(Default,ItemWithFeatures,RandConstruct,Hash,Debug,Clone,Serialize,Deserialize,PartialEq,Eq)]
#[ai("A Lyrical meter, consisting of a foot and a line length.")]
#[ai(Display)]
pub struct LyricalMeter {
foot: MetricalFoot,
#[rand_construct(psome=0.5)]
#[ai(feature_if_none="The number of feet per line is flexible.")]
length: Option<LineLength>,
}
impl LyricalMeter {
pub fn builder() -> LyricalMeterBuilder {
LyricalMeterBuilder::default()
}
pub fn foot(&self) -> &MetricalFoot {
&self.foot
}
pub fn length(&self) -> Option<&LineLength> {
self.length.as_ref()
}
pub fn set_foot(&mut self, foot: MetricalFoot) -> &mut Self {
self.foot = foot;
self
}
pub fn set_length(&mut self, length: Option<LineLength>) -> &mut Self {
self.length = length;
self
}
}