lyrical_meter/
other_meter.rs

1crate::ix!();
2
3/// Enum for other types of meters that don't fit into the regular pattern.
4#[derive(ItemFeature,RandConstruct,Default,Hash,Debug,Clone,Copy,Serialize,Deserialize,PartialEq,Eq)]
5pub enum OtherMeter {
6    #[default]
7    #[ai("Write in free verse, without a consistent meter or rhyme scheme.")]        FreeVerse,     
8    #[ai("Use climbing rhyme, where stressed syllables increase through the line.")] ClimbingRhyme, 
9    #[ai("Use falling rhyme, where stressed syllables decrease through the line.")]  FallingRhyme,  
10    #[ai("Use mixed meter, combining different metrical feet within a line.")]       MixedMeter,    
11    #[ai("Write in blank verse, using unrhymed iambic pentameter.")]                 BlankVerse,    
12}
13
14impl OtherMeter {
15    /// Returns true if the meter is considered free verse.
16    pub fn is_free_verse(&self) -> bool {
17        matches!(self, OtherMeter::FreeVerse)
18    }
19
20    /// Returns true if the meter is considered blank verse.
21    pub fn is_blank_verse(&self) -> bool {
22        matches!(self, OtherMeter::BlankVerse)
23    }
24}