Enum ukebox::staff_position::StaffPosition
source · pub enum StaffPosition {
CPos,
DPos,
EPos,
FPos,
GPos,
APos,
BPos,
}
Expand description
The vertical position of the notehead on the staff (on a line or in a space). We use the staff position of an enharmonic note to decide whether it is sharp or flat.
For example, a note with pitch class FSharp
can either be written as F#
(if its staff position is FPos
or Gb
(if its staff position is GPos
).
https://en.wikipedia.org/wiki/Staff_(music)#Staff_positions
Variants§
Trait Implementations§
source§impl Add<u8> for StaffPosition
impl Add<u8> for StaffPosition
source§fn add(self, n: StaffSteps) -> Self
fn add(self, n: StaffSteps) -> Self
Get the staff position that is n
positions higher than the current one.
§type Output = StaffPosition
type Output = StaffPosition
The resulting type after applying the
+
operator.source§impl Clone for StaffPosition
impl Clone for StaffPosition
source§fn clone(&self) -> StaffPosition
fn clone(&self) -> StaffPosition
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for StaffPosition
impl Debug for StaffPosition
source§impl From<u8> for StaffPosition
impl From<u8> for StaffPosition
source§fn from(n: StaffSteps) -> Self
fn from(n: StaffSteps) -> Self
Converts to this type from the input type.
source§impl Ord for StaffPosition
impl Ord for StaffPosition
source§fn cmp(&self, other: &StaffPosition) -> Ordering
fn cmp(&self, other: &StaffPosition) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for StaffPosition
impl PartialEq for StaffPosition
source§fn eq(&self, other: &StaffPosition) -> bool
fn eq(&self, other: &StaffPosition) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for StaffPosition
impl PartialOrd for StaffPosition
source§fn partial_cmp(&self, other: &StaffPosition) -> Option<Ordering>
fn partial_cmp(&self, other: &StaffPosition) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for StaffPosition
impl Eq for StaffPosition
impl StructuralPartialEq for StaffPosition
Auto Trait Implementations§
impl Freeze for StaffPosition
impl RefUnwindSafe for StaffPosition
impl Send for StaffPosition
impl Sync for StaffPosition
impl Unpin for StaffPosition
impl UnwindSafe for StaffPosition
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.