Skip to main content

KnotArray

Trait KnotArray 

Source
pub trait KnotArray<const N: usize>: AxisLookup<N> {
    // Required method
    fn knots(&self) -> &'static [u16; N];
}
Expand description

An axis whose knots are stored as one static array.

LinearAxis, BinaryAxis, and BucketedAxis implement it; UniformAxis does not, because it stores no knots to hand out. It is what keeps BilinearSurface::x_axis available for the strategies that have an array, without inventing one for the strategy that deliberately does not.

This trait is sealed for the same reason AxisLookup is.

Required Methods§

Source

fn knots(&self) -> &'static [u16; N]

Returns the declared knots, strictly increasing and at least two long.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<const N: usize, const B: usize> KnotArray<N> for BucketedAxis<N, B>

Source§

impl<const N: usize> KnotArray<N> for BinaryAxis<N>

Source§

impl<const N: usize> KnotArray<N> for LinearAxis<N>