pub struct Beat {
pub notes: Vec<Note>,
pub duration: NoteDuration,
pub is_rest: bool,
pub chord: Option<ChordInfo>,
}Expand description
Beat representation
Fields§
§notes: Vec<Note>§duration: NoteDuration§is_rest: bool§chord: Option<ChordInfo>Implementations§
Source§impl Beat
impl Beat
Sourcepub fn new_rest(duration: NoteDuration) -> Self
pub fn new_rest(duration: NoteDuration) -> Self
Create a new rest beat
Sourcepub fn new_with_notes(notes: Vec<Note>, duration: NoteDuration) -> Self
pub fn new_with_notes(notes: Vec<Note>, duration: NoteDuration) -> Self
Create a new beat with notes
Trait Implementations§
impl StructuralPartialEq for Beat
Auto Trait Implementations§
impl Freeze for Beat
impl RefUnwindSafe for Beat
impl Send for Beat
impl Sync for Beat
impl Unpin for Beat
impl UnwindSafe for Beat
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