Trait axgeom::Axis

source ·
pub trait Axis: Sync + Send + Copy + Clone {
    type Next: Axis;

    // Required methods
    fn is_xaxis(&self) -> bool;
    fn next(&self) -> Self::Next;

    // Provided methods
    fn to_dyn(&self) -> AxisDyn { ... }
    fn is_equal_to<B: Axis>(&self, other: B) -> bool { ... }
}
Expand description

Axis trait can be used to extract the x or y portions of a container. when you know the axis as compile time. The X implementation of this trait’s Next associated trait is the Y implementation. The Y implementation of this trait’s Next associated trait is the X implementation.

Required Associated Types§

Required Methods§

source

fn is_xaxis(&self) -> bool

source

fn next(&self) -> Self::Next

Provided Methods§

source

fn to_dyn(&self) -> AxisDyn

Convert a statically known axis into a dynamic one.

source

fn is_equal_to<B: Axis>(&self, other: B) -> bool

Implementors§