pub enum Meter {
Standard(LyricalMeter),
Other(OtherMeter),
}Expand description
Enum representing any type of meter, either standard or other.
Variants§
Standard(LyricalMeter)
Other(OtherMeter)
Implementations§
Source§impl Meter
impl Meter
Sourcepub fn is_same_type(&self, other: &Meter) -> bool
pub fn is_same_type(&self, other: &Meter) -> bool
Checks if two meters are of the same type.
Sourcepub fn as_standard(&self) -> Option<&LyricalMeter>
pub fn as_standard(&self) -> Option<&LyricalMeter>
Converts the Meter into a LyricalMeter if it is Standard.
Sourcepub fn as_other(&self) -> Option<&OtherMeter>
pub fn as_other(&self) -> Option<&OtherMeter>
Converts the Meter into an OtherMeter if it is Other.
Trait Implementations§
Source§impl AIDescriptor for Meter
impl AIDescriptor for Meter
Source§impl<'de> Deserialize<'de> for Meter
impl<'de> Deserialize<'de> for Meter
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl RandConstructEnum for Meter
impl RandConstructEnum for Meter
fn all_variants() -> Vec<Self>
fn default_weight(&self) -> f64
fn create_default_probability_map() -> Arc<HashMap<Meter, f64>>
fn random_variant() -> Self
fn uniform_variant() -> Self
fn random_enum_value_with_rng<RNG>(rng: &mut RNG) -> Self
Source§impl RandConstructEnumWithEnv for Meter
impl RandConstructEnumWithEnv for Meter
fn random_with_env<P>() -> Selfwhere
P: RandConstructProbabilityMapProvider<Self>,
fn random_uniform_with_env<P>() -> Selfwhere
P: RandConstructProbabilityMapProvider<Self>,
fn sample_from_provider<P, RNG>(rng: &mut RNG) -> Self
fn sample_uniformly_from_provider<P, RNG>(rng: &mut RNG) -> Self
impl Eq for Meter
impl StructuralPartialEq for Meter
Auto Trait Implementations§
impl Freeze for Meter
impl RefUnwindSafe for Meter
impl Send for Meter
impl Sync for Meter
impl Unpin for Meter
impl UnwindSafe for Meter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more