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.