pub struct BrailleTextLine {
pub is_heading: bool,
pub contains_note_grouping: bool,
pub line_length: usize,
pub text_location: usize,
pub highest_used_location: usize,
/* private fields */
}Expand description
One line of braille, written into cell by cell: music21’s
BrailleTextLine.
Fields§
§is_heading: boolWhether the line is part of a heading.
contains_note_grouping: boolWhether a group of notes has been written on it.
line_length: usizeHow many cells the line holds.
text_location: usizeWhere the next cell is written.
highest_used_location: usizeHow far the line has been written.
Implementations§
Source§impl BrailleTextLine
impl BrailleTextLine
Sourcepub fn append(&mut self, text: &str, add_space: bool) -> Result<()>
pub fn append(&mut self, text: &str, add_space: bool) -> Result<()>
Writes text at the end, after a space where asked: music21’s
append.
§Errors
Text that does not fit.
Sourcepub fn insert(&mut self, location: usize, text: &str) -> Result<()>
pub fn insert(&mut self, location: usize, text: &str) -> Result<()>
Writes text from a cell on, the line then ending after it: music21’s
insert.
§Errors
Text that does not fit there.
Sourcepub fn can_append(&self, text: &str, add_space: bool) -> bool
pub fn can_append(&self, text: &str, add_space: bool) -> bool
Whether text fits at the end, after a space where asked: music21’s
canAppend.
Sourcepub fn can_insert(&self, location: usize, text: &str) -> bool
pub fn can_insert(&self, location: usize, text: &str) -> bool
Whether text fits from a cell on: music21’s canInsert.
Sourcepub fn last_hyphen_to_space(&mut self)
pub fn last_hyphen_to_space(&mut self)
Takes back a music hyphen ending the line: music21’s
lastHyphenToSpace.
Trait Implementations§
Source§impl Clone for BrailleTextLine
impl Clone for BrailleTextLine
Source§impl Debug for BrailleTextLine
impl Debug for BrailleTextLine
impl Eq for BrailleTextLine
Source§impl PartialEq for BrailleTextLine
impl PartialEq for BrailleTextLine
impl StructuralPartialEq for BrailleTextLine
Auto Trait Implementations§
impl Freeze for BrailleTextLine
impl RefUnwindSafe for BrailleTextLine
impl Send for BrailleTextLine
impl Sync for BrailleTextLine
impl Unpin for BrailleTextLine
impl UnsafeUnpin for BrailleTextLine
impl UnwindSafe for BrailleTextLine
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