musicxml/elements/feature.rs
1use crate::datatypes::Token;
2use alloc::{string::String, vec::Vec};
3use musicxml_internal::*;
4use musicxml_macros::*;
5
6/// Attributes pertaining to the [Feature] element.
7#[derive(Debug, Default, PartialEq, Eq, AttributeDeserialize, AttributeSerialize)]
8pub struct FeatureAttributes {
9 /// Represents the type of the feature. This type is flexible to allow for different analyses.
10 pub r#type: Option<Token>,
11}
12
13/// The [Feature] element is a part of the [Grouping][super::Grouping] element used for musical analysis.
14///
15/// The `type` attribute represents the type of the feature and the element content represents its value.
16#[derive(Debug, PartialEq, Eq, ElementDeserialize, ElementSerialize)]
17pub struct Feature {
18 /// Element-specific attributes
19 pub attributes: FeatureAttributes,
20 /// Element-specific content
21 pub content: String,
22}