pub struct Beam { /* private fields */ }Expand description
One beam at one level: music21’s beam.Beam.
Implementations§
Source§impl Beam
impl Beam
Sourcepub fn new(
beam_type: impl Into<Option<BeamType>>,
direction: Option<BeamDirection>,
) -> Self
pub fn new( beam_type: impl Into<Option<BeamType>>, direction: Option<BeamDirection>, ) -> Self
A beam of the given type, with a direction only a partial one needs.
Sourcepub fn beam_type(&self) -> Option<BeamType>
pub fn beam_type(&self) -> Option<BeamType>
Whether the beam starts, carries on, ends, or is a stub — and nothing at all where that has not been decided.
Sourcepub fn set_beam_type(&mut self, beam_type: Option<BeamType>)
pub fn set_beam_type(&mut self, beam_type: Option<BeamType>)
Says what the beam does at this note.
Sourcepub fn direction(&self) -> Option<BeamDirection>
pub fn direction(&self) -> Option<BeamDirection>
Which way a stub points, and nothing for a beam that is not one.
Sourcepub fn set_direction(&mut self, direction: Option<BeamDirection>)
pub fn set_direction(&mut self, direction: Option<BeamDirection>)
Points a stub the other way.
Sourcepub fn number(&self) -> Option<u32>
pub fn number(&self) -> Option<u32>
Which level this beam is: the first is the one an eighth note has.
Sourcepub fn set_number(&mut self, number: Option<u32>)
pub fn set_number(&mut self, number: Option<u32>)
Puts the beam at a level.
Trait Implementations§
impl Copy for Beam
Source§impl<'de> Deserialize<'de> for Beam
Available on crate feature serde only.
impl<'de> Deserialize<'de> for Beam
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 Beam
impl StructuralPartialEq for Beam
Auto Trait Implementations§
impl Freeze for Beam
impl RefUnwindSafe for Beam
impl Send for Beam
impl Sync for Beam
impl Unpin for Beam
impl UnsafeUnpin for Beam
impl UnwindSafe for Beam
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