Struct iced_audio::native::tick_marks::Group[][src]

pub struct Group { /* fields omitted */ }

A group of tick marks.

tick mark: struct.TickMark.html

Implementations

impl Group[src]

pub fn from_normalized(tick_marks: &[(Normal, Tier)]) -> Self[src]

Constructs a new Group from an array of normalized values and tiers.

pub fn center(tier: Tier) -> Self[src]

Returns a new Group with a single tick mark in the center position.

  • tier - a Tier representing the size of the tick mark

pub fn min_max(tier: Tier) -> Self[src]

Returns a new Group with a tick mark in the min (0.0) position and max (1.0) position.

  • tier - a Tier representing the size of the tick mark

pub fn min_max_and_center(min_max_tier: Tier, center_tier: Tier) -> Self[src]

Returns a new Group with a tick mark in the min (0.0), the max (1.0), and center (0.5) positions.

  • min_max_tier - a Tier representing the size of the min and max tick marks
  • center_tier - a Tier representing the size of the center tick mark

pub fn subdivided(
    one: usize,
    two: usize,
    three: usize,
    sides: Option<Tier>
) -> Self
[src]

Creates a group of tick marks by subdividing the range.

  • one - The number of tier 1 tick marks. For example, 1 will put a single tier 1 tick mark at the 0.5 (center) position. 3 will put three tick marks at 0.25, 0.5, 0.75. For no tier 1 tick marks, put 0.
  • two - The number of tier 2 tick marks in each range between tier 1 tick marks. If there are no tier 1 tick marks, then it will behave the same as tier 1 tick marks.
  • three - The number of tier 3 tick marks in each range between tier 2 tick marks. If there are no tier 2 tick marks, then it will behave the same as tier 2 tick marks.
  • sides - The tier of tick marks to put on the two sides (0.0 and 1.0). For no tick marks on the sides, put None.

pub fn evenly_spaced(len: usize, tier: Tier) -> Self[src]

Creates a Group of evenly spaced tick marks

  • len - the number of tick marks
  • tier - the Tier of the tick marks

pub fn tier_1(&self) -> Option<&Vec<Normal>>[src]

Returns the positions of the tier 1 tick marks. Returns None if there are no tier 1 tick marks.

pub fn tier_2(&self) -> Option<&Vec<Normal>>[src]

Returns the positions of the tier 2 tick marks. Returns None if there are no tier 2 tick marks.

pub fn tier_3(&self) -> Option<&Vec<Normal>>[src]

Returns the positions of the tier 3 tick marks. Returns None if there are no tier 3 tick marks.

pub fn len(&self) -> usize[src]

Returns the total number of tick marks.

Trait Implementations

impl Clone for Group[src]

fn clone(&self) -> Group[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for Group[src]

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

Formats the value using the given formatter. Read more

impl Default for Group[src]

fn default() -> Self[src]

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

impl From<&'_ [(Normal, Tier)]> for Group[src]

fn from(slice: &[(Normal, Tier)]) -> Self[src]

Performs the conversion.

impl From<Vec<(Normal, Tier), Global>> for Group[src]

fn from(vec: Vec<(Normal, Tier)>) -> Self[src]

Performs the conversion.

Auto Trait Implementations

impl RefUnwindSafe for Group

impl Send for Group

impl Sync for Group

impl Unpin for Group

impl UnwindSafe for Group

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

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

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

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

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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

Performs the conversion.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

pub fn vzip(self) -> V