Tab

Struct Tab 

Source
pub struct Tab {
    pub uuid: Uuid,
    pub meta: Arc<TabMeta>,
    pub tracks: Vec<Arc<Track>>,
    pub sections: Vec<Arc<Section>>,
    pub form: Form,
    pub bars: Vec<Arc<TabBar>>,
}

Fields§

§uuid: Uuid§meta: Arc<TabMeta>§tracks: Vec<Arc<Track>>§sections: Vec<Arc<Section>>§form: Form§bars: Vec<Arc<TabBar>>

Implementations§

Source§

impl Tab

Source

pub fn try_parse_arc( proto: Tab, add_ready_section: bool, bars_range: Option<(usize, usize)>, ) -> Result<Arc<Self>, ParseError>

Source§

impl Tab

Source

pub fn bar_units(&self) -> Units

Source

pub fn bar_beats(&self) -> u8

Source

pub fn signature(&self) -> Signature

Source

pub fn beat_unit(&self) -> Unit

Source

pub fn calc_syllable(&self, pitch: &Pitch) -> Syllable

Source

pub fn calc_note_from_pitch(&self, pitch: &Pitch, octave: &Octave) -> Note

Source

pub fn calc_note_from_syllable( &self, syllable: &Syllable, octave: &Octave, ) -> Note

Source

pub fn get_track_of_kind(&self, kind: TrackKind) -> Option<Arc<Track>>

Source

pub fn get_bar_of_ordinal(&self, bar_ordinal: usize) -> Option<Arc<TabBar>>

Source

pub fn get_bar(&self, pos: BarPosition) -> Option<Arc<TabBar>>

Trait Implementations§

Source§

impl Debug for Tab

Source§

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

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

impl Display for Tab

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Tab

§

impl RefUnwindSafe for Tab

§

impl Send for Tab

§

impl Sync for Tab

§

impl Unpin for Tab

§

impl UnwindSafe for Tab

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> 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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.