Skip to main content

NwcStaff

Struct NwcStaff 

Source
pub struct NwcStaff {
Show 17 fields pub name: Vec<u8>, pub label: Vec<u8>, pub instrument_name: Vec<u8>, pub group: Vec<u8>, pub lines: u8, pub layer_with_next_staff: Option<i32>, pub transposition: Option<i32>, pub part_volume: Option<i32>, pub stereo_pan: Option<i32>, pub color: u8, pub align_syllable: Option<i32>, pub number_of_lyrics: i32, pub lyric_alignment: i32, pub staff_offset: i32, pub lyrics: Vec<Vec<Vec<u8>>>, pub number_of_objects: i32, pub objects: Vec<NwcObject>,
}
Expand description

A staff and its objects: music21’s NWCStaff.

Fields§

§name: Vec<u8>§label: Vec<u8>§instrument_name: Vec<u8>§group: Vec<u8>§lines: u8§layer_with_next_staff: Option<i32>§transposition: Option<i32>

Semitones up, where the file says; music21 writes None otherwise.

§part_volume: Option<i32>§stereo_pan: Option<i32>§color: u8§align_syllable: Option<i32>§number_of_lyrics: i32§lyric_alignment: i32§staff_offset: i32§lyrics: Vec<Vec<Vec<u8>>>

Each verse’s syllables.

§number_of_objects: i32§objects: Vec<NwcObject>

Implementations§

Source§

impl NwcStaff

Source

pub fn dump(&self) -> Vec<String>

music21’s NWCStaff.dump: the staff and its instrument as text lines, then each object that writes one.

Trait Implementations§

Source§

impl Clone for NwcStaff

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for NwcStaff

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for NwcStaff

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Eq for NwcStaff

Source§

impl PartialEq for NwcStaff

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for NwcStaff

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.