Trait CalibrationData

Source
pub trait CalibrationData {
    type Iterator<'a>
       where Self: 'a;

    const LEN: usize;

    // Required methods
    fn first(&self) -> Point;
    fn second(&self) -> Point;
    fn penultimate(&self) -> Point;
    fn last(&self) -> Point;
    fn windows(&self) -> Self::Iterator<'_>;
}
Expand description

A trait to cover any type that can represent calibration data.

Required Associated Constants§

Required Associated Types§

Source

type Iterator<'a> where Self: 'a

Required Methods§

Source

fn first(&self) -> Point

The first data point in the calibration data. This might overlap with Self::penultimate.

Source

fn second(&self) -> Point

The second data point in the calibration data. This might overlap with Self::last.

Source

fn penultimate(&self) -> Point

The penultimate (just before last) data point in the calibration data. This might overlap with Self::first.

Source

fn last(&self) -> Point

The last data point in the calibration data. This might overlap with Self::second.

Source

fn windows(&self) -> Self::Iterator<'_>

Returns an iterator that walks over the calibration data in a 2-slot window. This is equivalent to the windows method on slices.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§