pub trait Primitive: Copy + NumCast + Num + PartialOrd<Self> + Clone + Bounded {
    const DEFAULT_MAX_VALUE: Self;
    const DEFAULT_MIN_VALUE: Self;
}
Expand description

The type of each channel in a pixel. For example, this can be u8, u16, f32.

Required Associated Constants§

const DEFAULT_MAX_VALUE: Self

The maximum value for this type of primitive within the context of color. For floats, the maximum is 1.0, whereas the integer types inherit their usual maximum values.

const DEFAULT_MIN_VALUE: Self

The minimum value for this type of primitive within the context of color. For floats, the minimum is 0.0, whereas the integer types inherit their usual minimum values.

Implementations on Foreign Types§

§

impl Primitive for i16

§

const DEFAULT_MAX_VALUE: i16 = 32_767i16

§

const DEFAULT_MIN_VALUE: i16 = -32_768i16

§

impl Primitive for i8

§

const DEFAULT_MAX_VALUE: i8 = 127i8

§

const DEFAULT_MIN_VALUE: i8 = -128i8

§

impl Primitive for usize

§

const DEFAULT_MAX_VALUE: usize = 18_446_744_073_709_551_615usize

§

const DEFAULT_MIN_VALUE: usize = 0usize

§

impl Primitive for u32

§

const DEFAULT_MAX_VALUE: u32 = 4_294_967_295u32

§

const DEFAULT_MIN_VALUE: u32 = 0u32

§

impl Primitive for u64

§

const DEFAULT_MAX_VALUE: u64 = 18_446_744_073_709_551_615u64

§

const DEFAULT_MIN_VALUE: u64 = 0u64

§

impl Primitive for i32

§

const DEFAULT_MAX_VALUE: i32 = 2_147_483_647i32

§

const DEFAULT_MIN_VALUE: i32 = -2_147_483_648i32

§

impl Primitive for f64

§

const DEFAULT_MAX_VALUE: f64 = 1f64

§

const DEFAULT_MIN_VALUE: f64 = 0f64

§

impl Primitive for isize

§

const DEFAULT_MAX_VALUE: isize = 9_223_372_036_854_775_807isize

§

const DEFAULT_MIN_VALUE: isize = -9_223_372_036_854_775_808isize

§

impl Primitive for i64

§

const DEFAULT_MAX_VALUE: i64 = 9_223_372_036_854_775_807i64

§

const DEFAULT_MIN_VALUE: i64 = -9_223_372_036_854_775_808i64

§

impl Primitive for u16

§

const DEFAULT_MAX_VALUE: u16 = 65_535u16

§

const DEFAULT_MIN_VALUE: u16 = 0u16

§

impl Primitive for f32

§

const DEFAULT_MAX_VALUE: f32 = 1f32

§

const DEFAULT_MIN_VALUE: f32 = 0f32

§

impl Primitive for u8

§

const DEFAULT_MAX_VALUE: u8 = 255u8

§

const DEFAULT_MIN_VALUE: u8 = 0u8

Implementors§