pub struct ElementTimespan<'a> { /* private fields */ }Expand description
One element of a stream, from where it starts to where it ends:
music21’s ElementTimespan, and its PitchedTimespan where the element
is a note-like one or a stream.
Implementations§
Source§impl<'a> ElementTimespan<'a>
impl<'a> ElementTimespan<'a>
Sourcepub fn element(&self) -> &'a StreamElement
pub fn element(&self) -> &'a StreamElement
The element.
Sourcepub fn quarter_length(&self) -> FloatType
pub fn quarter_length(&self) -> FloatType
How long it lasts.
Sourcepub fn parent_offset(&self) -> FloatType
pub fn parent_offset(&self) -> FloatType
Where the stream holding it starts: music21’s parentOffset.
Sourcepub fn parent_end_time(&self) -> FloatType
pub fn parent_end_time(&self) -> FloatType
Where the stream holding it ends: music21’s parentEndTime.
Sourcepub fn parentage(&self) -> &[&'a Stream]
pub fn parentage(&self) -> &[&'a Stream]
The streams it stands in, the one holding it first and the stream
read last: music21’s parentage.
Sourcepub fn measure_number(&self) -> Option<IntegerType>
pub fn measure_number(&self) -> Option<IntegerType>
The number of the measure it is in, if it is in one: music21’s
measureNumber.
Sourcepub fn is_pitched(&self) -> bool
pub fn is_pitched(&self) -> bool
Whether it is music21’s PitchedTimespan: the element a note, chord,
chord symbol, unpitched stroke, percussion chord or stream.
Trait Implementations§
Source§impl<'a> Clone for ElementTimespan<'a>
impl<'a> Clone for ElementTimespan<'a>
Auto Trait Implementations§
impl<'a> Freeze for ElementTimespan<'a>
impl<'a> RefUnwindSafe for ElementTimespan<'a>
impl<'a> Send for ElementTimespan<'a>
impl<'a> Sync for ElementTimespan<'a>
impl<'a> Unpin for ElementTimespan<'a>
impl<'a> UnsafeUnpin for ElementTimespan<'a>
impl<'a> UnwindSafe for ElementTimespan<'a>
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