Enum nannou::draw::properties::spatial::dimension::Dimension[][src]

pub enum Dimension<S = DefaultScalar> {
    Absolute(S),
    Relative(IndexRelative<S>),
}

The length of a Node over either the x or y axes.

This type is used to represent the different ways in which a dimension may be sized.

Variants

Some specific length has been given.

The dimension is described as relative to the node at the given index.

Methods

impl<S> Dimension<S> where
    S: BaseFloat
[src]

Return the Dimension as a scalar value.

Relative dimensions are produced by accessing the dimension of some relative node via the given dimension_of function.

Trait Implementations

impl<S: Copy> Copy for Dimension<S>
[src]

impl<S: Clone> Clone for Dimension<S>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<S: Debug> Debug for Dimension<S>
[src]

Formats the value using the given formatter. Read more

impl<S: PartialEq> PartialEq for Dimension<S>
[src]

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

This method tests for !=.

Auto Trait Implementations

impl<S> Send for Dimension<S> where
    S: Send

impl<S> Sync for Dimension<S> where
    S: Sync