pub enum StemDirection {
Double,
Down,
NoStem,
Unspecified,
Up,
}Expand description
Which way the stem points: music21’s stemDirectionNames.
Variants§
Double
Stems both up and down, for a divided part.
Down
Stem down.
NoStem
Written with no stem at all, as a harmonic sounding pitch is.
Unspecified
Not said, the default.
Up
Stem up.
Implementations§
Source§impl StemDirection
impl StemDirection
Sourcepub const ALL: [StemDirection; 5]
pub const ALL: [StemDirection; 5]
Every stem direction a note can hold.
One shorter than music21’s StemDirection::NAMES: "none" is an
input spelling of "noStem" that music21’s setter rewrites, so no
note ever reads back as "none".
Sourcepub const NAMES: [&'static str; 6]
pub const NAMES: [&'static str; 6]
music21’s stemDirectionNames: the names the setter accepts, which
includes the "none" spelling of "noStem".
Sourcepub fn from_name(name: &str) -> Result<Self>
pub fn from_name(name: &str) -> Result<Self>
Reads music21’s name for the direction.
"none" reads as StemDirection::NoStem, which is what music21’s
setter stores for it.
Trait Implementations§
Source§impl Clone for StemDirection
impl Clone for StemDirection
Source§fn clone(&self) -> StemDirection
fn clone(&self) -> StemDirection
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for StemDirection
Source§impl Debug for StemDirection
impl Debug for StemDirection
Source§impl Default for StemDirection
impl Default for StemDirection
Source§fn default() -> StemDirection
fn default() -> StemDirection
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for StemDirection
Available on crate feature serde only.
impl<'de> Deserialize<'de> for StemDirection
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
Source§impl Display for StemDirection
impl Display for StemDirection
impl Eq for StemDirection
Source§impl Hash for StemDirection
impl Hash for StemDirection
Source§impl PartialEq for StemDirection
impl PartialEq for StemDirection
Source§impl Serialize for StemDirection
Available on crate feature serde only.
impl Serialize for StemDirection
Available on crate feature
serde only.impl StructuralPartialEq for StemDirection
Auto Trait Implementations§
impl Freeze for StemDirection
impl RefUnwindSafe for StemDirection
impl Send for StemDirection
impl Sync for StemDirection
impl Unpin for StemDirection
impl UnsafeUnpin for StemDirection
impl UnwindSafe for StemDirection
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