musicxml/datatypes/start_stop_continue.rs
1use alloc::string::String;
2use musicxml_internal::{DatatypeDeserializer, DatatypeSerializer};
3use musicxml_macros::{DatatypeDeserialize, DatatypeSerialize};
4
5/// Used for musical elements that can either start or stop, but also need to refer to an intermediate point in the symbol,
6/// as for complex slurs or for formatting of symbols across system breaks.
7///
8/// The values of [Start][StartStopContinue::Start], [Stop][StartStopContinue::Stop], and [Continue][StartStopContinue::Continue]
9/// refer to how an element appears in musical score order, not in MusicXML document order. An element with a
10/// [Stop][StartStopContinue::Stop] attribute may precede the corresponding element with a [Start][StartStopContinue::Start]
11/// attribute within a MusicXML document. This is particularly common in multi-staff music. For example, the stopping point
12/// for a slur may appear in staff 1 before the starting point for the slur appears in staff 2 later in the document.
13///
14/// When multiple elements with the same tag are used within the same note, their order within the MusicXML document should
15/// match the musical score order. For example, a note that marks both the end of one slur and the start of a new slur
16/// should have the incoming slur element with a type of [Stop][StartStopContinue::Stop] precede the outgoing slur element
17/// with a type of [Start][StartStopContinue::Start].
18#[derive(Debug, PartialEq, Eq, DatatypeDeserialize, DatatypeSerialize)]
19pub enum StartStopContinue {
20 /// Starting point of an element.
21 Start,
22 /// Stopping point of an element.
23 Stop,
24 /// Continuation of an element, including system breaks.
25 Continue,
26}