Trait img::Scalar [] [src]

pub trait Scalar: Copy + Clone + Debug + PartialEq<Self> + Add<Self, Output = Self> + AddAssign<Self> + Sub<Self, Output = Self> + SubAssign<Self> + Mul<Self, Output = Self> + MulAssign<Self> + Div<Self, Output = Self> + DivAssign<Self> { }

Trait which defines the minimum requirements for a numeric type in the context of this crate.

It is important to note, that usually you want to use ScalarVal instead of directly use this trait. Use this trait directly if you want to describe a type bound. This is for example necessary if you want to define a type with a parameter, which has to be a Scalar. To store actual values use ScalarVal.

Examples

use img::{Scalar, ScalarVal};
struct Foo<T: Scalar> {
    data: ScalarVal<T>,
};

Implementors