pub struct Score {
pub name: Option<String>,
pub movements: Vec<Movement>,
pub timeline: Option<Timeline>,
pub context_changes: Vec<ContextChange>,
}Expand description
The top-level container for a complete musical work.
A score can either be:
- Multi-movement (symphony, sonata) with separate movements
- Single-timeline (song, short piece) with direct timeline
Fields§
§name: Option<String>§movements: Vec<Movement>§timeline: Option<Timeline>§context_changes: Vec<ContextChange>Implementations§
Source§impl Score
impl Score
pub fn set_name(&mut self, name: String)
pub fn with_name(self, name: String) -> Self
pub fn add_movement(&mut self, movement: Movement)
pub fn with_movement(self, movement: Movement) -> Self
pub fn set_timeline(&mut self, timeline: Timeline)
pub fn with_timeline(self, timeline: Timeline) -> Self
pub fn add_context_change(&mut self, change: ContextChange)
pub fn with_context_change(self, change: ContextChange) -> Self
pub fn total_duration(&self) -> Fraction
Sourcepub fn is_multi_movement(&self) -> bool
pub fn is_multi_movement(&self) -> bool
Returns true if this score contains multiple movements.
Trait Implementations§
impl StructuralPartialEq for Score
Auto Trait Implementations§
impl Freeze for Score
impl RefUnwindSafe for Score
impl Send for Score
impl Sync for Score
impl Unpin for Score
impl UnsafeUnpin for Score
impl UnwindSafe for Score
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