Struct time_calc::measure::Measure [] [src]

pub struct Measure(pub NumDiv, pub Division, pub DivType);

Time representation in the form of a Musical Measure.

i.e. Measure(1, Bar, Whole) is one bar of musical time. Measure(3, Beat, Whole) is three beats of musical time. Measure(1, Minim, TwoThirds) is two thirds of a minim.

Methods

impl Measure
[src]

[src]

Return the number of divisions.

[src]

Return the division measure.

[src]

Return the division type.

[src]

Convert to the equivalent duration in Beats.

[src]

Convert to the equivalent duration in Bars.

[src]

Convert to the unit value of Ms.

[src]

Convert to Ms.

[src]

Convert to the unit value of Samples.

[src]

Convert to Samples.

[src]

Convert to the unit value of Ticks.

[src]

Convert to Ticks.

Trait Implementations

impl Debug for Measure
[src]

[src]

Formats the value using the given formatter.

impl Copy for Measure
[src]

impl Clone for Measure
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl PartialEq for Measure
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl Eq for Measure
[src]

impl Hash for Measure
[src]

[src]

Feeds this value into the given [Hasher]. Read more

1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl From<Bars> for Measure
[src]

[src]

Performs the conversion.

impl From<Beats> for Measure
[src]

[src]

Performs the conversion.

impl From<Division> for Measure
[src]

[src]

Performs the conversion.