pub struct Staff {
pub voices: Vec<StaffVoice>,
}Expand description
Identity-bearing canonical score timeline.
A staff is the lossless interlingua for note-bearing catalog forms. It
retains voice boundaries, exact rational timing, trailing silence, and
stable note/event identities without requiring those concerns in the
lightweight Note value.
Fields§
§voices: Vec<StaffVoice>Independent or simultaneous voices.
Implementations§
Source§impl Staff
impl Staff
Sourcepub fn new(voices: Vec<StaffVoice>) -> Result<Self, ConversionError>
pub fn new(voices: Vec<StaffVoice>) -> Result<Self, ConversionError>
Builds and validates a staff, sorting voices and notes canonically.
Sourcepub fn notes(&self) -> impl Iterator<Item = &StaffNote>
pub fn notes(&self) -> impl Iterator<Item = &StaffNote>
Iterates over all notes in canonical voice/time order.
Sourcepub fn object_ids(&self) -> Vec<ObjectId>
pub fn object_ids(&self) -> Vec<ObjectId>
Returns every voice, note, and event identity in sorted order.
Trait Implementations§
impl Eq for Staff
Source§impl MusicObject for Staff
impl MusicObject for Staff
impl StructuralPartialEq for Staff
Auto Trait Implementations§
impl Freeze for Staff
impl RefUnwindSafe for Staff
impl Send for Staff
impl Sync for Staff
impl Unpin for Staff
impl UnsafeUnpin for Staff
impl UnwindSafe for Staff
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