1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
use super::{DegreeAlter, DegreeType, DegreeValue};
use crate::datatypes::YesNo;
use alloc::{string::String, vec::Vec};
use musicxml_internal::*;
use musicxml_macros::*;
/// Attributes pertaining to the [Degree] element.
#[derive(Debug, Default, PartialEq, Eq, AttributeDeserialize, AttributeSerialize)]
pub struct DegreeAttributes {
/// Specifies whether or not to print an object. It is yes if not specified.
pub print_object: Option<YesNo>,
}
/// Contents of the [Degree] element.
#[derive(Debug, PartialEq, Eq, ContentDeserialize, ContentSerialize)]
pub struct DegreeContents {
/// The [DegreeValue] element specifies the degree value for the degree element.
pub degree_value: DegreeValue,
/// The [DegreeAlter] element specifies the alteration for the degree value.
pub degree_alter: DegreeAlter,
/// The [DegreeType] element specifies the type of the degree element.
pub degree_type: DegreeType,
}
/// The [Degree] element is used to add, alter, or subtract individual notes in the chord.
///
/// The `print_object` attribute can be used to keep the degree from printing separately when it has already taken into account in the
/// text attribute of the [Kind][super::Kind] element.
///
/// A [Harmony][super::Harmony] with a [Kind][super::Kind] value of "other" can be spelled explicitly by using a series of [Degree] elements together with
/// a [Root][super::Root], [Numeral][super::Numeral], or [Function][super::Function] element.
#[derive(Debug, PartialEq, Eq, ElementDeserialize, ElementSerialize)]
pub struct Degree {
/// Element-specific attributes
pub attributes: DegreeAttributes,
#[flatten]
/// Element-specific content
pub content: DegreeContents,
}