pub struct Ending { /* private fields */ }Expand description
Where a measure stands in an alternative ending: music21’s
RepeatBracket, the bracket drawn over the measures played the first
time through, or the second.
music21 keeps the bracket as a spanner over the measures; a measure here says which ending it is in and whether the bracket opens or closes on it.
Implementations§
Source§impl Ending
impl Ending
Sourcepub fn new(numbers: Vec<u32>, starts: bool, stops: bool) -> Self
pub fn new(numbers: Vec<u32>, starts: bool, stops: bool) -> Self
An ending played the times numbered, opening on this measure where
starts and closing on it where stops. Nought as the only number
is an ending that gives none.
Sourcepub fn number_text(&self) -> String
pub fn number_text(&self) -> String
The numbers as MusicXML writes them, 1,2; an ending numbered
nought writes nothing.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Ending
Available on crate feature serde only.
impl<'de> Deserialize<'de> for Ending
Available on crate feature
serde only.Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Ending
impl StructuralPartialEq for Ending
Auto Trait Implementations§
impl Freeze for Ending
impl RefUnwindSafe for Ending
impl Send for Ending
impl Sync for Ending
impl Unpin for Ending
impl UnsafeUnpin for Ending
impl UnwindSafe for Ending
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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