musicxml/elements/
creator.rs

1use crate::datatypes::Token;
2use alloc::{string::String, vec::Vec};
3use musicxml_internal::*;
4use musicxml_macros::*;
5
6/// Attributes pertaining to the [Creator] element.
7#[derive(Debug, Default, PartialEq, Eq, AttributeDeserialize, AttributeSerialize)]
8pub struct CreatorAttributes {
9  /// Distinguishes different creative contributions. Thus there can be multiple [Creator] elements
10  /// within an [Identification][super::Identification] element. Standard values are composer, lyricist, and arranger.
11  /// Other values may be used for different types of creative roles. This attribute should usually be used even
12  /// if there is just a single [Creator] element.
13  pub r#type: Option<Token>,
14}
15
16/// The [Creator] element describes the creators of the score.
17///
18/// This is similar to the Dublin Core creator element. The MusicXML format does not use the creator / contributor distinction from Dublin Core.
19#[derive(Debug, PartialEq, Eq, ElementDeserialize, ElementSerialize)]
20pub struct Creator {
21  /// Element-specific attributes
22  pub attributes: CreatorAttributes,
23  /// Element-specific content
24  pub content: String,
25}