pub struct BrailleGrandSegment {
pub groupings: BTreeMap<SegmentKey, BrailleElementGrouping>,
pub line_length: usize,
pub right_contexts: Vec<NoteContext>,
pub left_contexts: Vec<NoteContext>,
}Expand description
A piano’s two staves cut into segments of groupings for each hand,
written side by side: music21’s BrailleGrandSegment.
Fields§
§groupings: BTreeMap<SegmentKey, BrailleElementGrouping>The groupings of both hands, by key.
line_length: usizeHow many cells a line holds.
right_contexts: Vec<NoteContext>What music21 marked on each leaf of the right hand’s part.
left_contexts: Vec<NoteContext>What music21 marked on each leaf of the left hand’s part.
Implementations§
Source§impl BrailleGrandSegment
impl BrailleGrandSegment
Sourcepub fn combined_keys(&self) -> Vec<(Option<SegmentKey>, Option<SegmentKey>)>
pub fn combined_keys(&self) -> Vec<(Option<SegmentKey>, Option<SegmentKey>)>
The keys of the two hands, paired measure by measure: music21’s
yieldCombinedGroupingKeys.
Sourcepub fn transcribe(&mut self) -> Result<String>
pub fn transcribe(&mut self) -> Result<String>
The two hands in braille: a heading, then each measure’s groupings
side by side: music21’s transcribe.
§Errors
Something too wide for a line, or that music21 cannot write.
Trait Implementations§
Source§impl Clone for BrailleGrandSegment
impl Clone for BrailleGrandSegment
Auto Trait Implementations§
impl Freeze for BrailleGrandSegment
impl RefUnwindSafe for BrailleGrandSegment
impl Send for BrailleGrandSegment
impl Sync for BrailleGrandSegment
impl Unpin for BrailleGrandSegment
impl UnsafeUnpin for BrailleGrandSegment
impl UnwindSafe for BrailleGrandSegment
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more