Trait image::Primitive

source ·
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§

source

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.

source

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§

source§

impl Primitive for f32

source§

const DEFAULT_MAX_VALUE: Self = 1f32

source§

const DEFAULT_MIN_VALUE: Self = 0f32

source§

impl Primitive for i64

source§

const DEFAULT_MAX_VALUE: Self = 9_223_372_036_854_775_807i64

source§

const DEFAULT_MIN_VALUE: Self = -9_223_372_036_854_775_808i64

source§

impl Primitive for isize

source§

const DEFAULT_MAX_VALUE: Self = 9_223_372_036_854_775_807isize

source§

const DEFAULT_MIN_VALUE: Self = -9_223_372_036_854_775_808isize

source§

impl Primitive for u64

source§

const DEFAULT_MAX_VALUE: Self = 18_446_744_073_709_551_615u64

source§

const DEFAULT_MIN_VALUE: Self = 0u64

source§

impl Primitive for usize

source§

const DEFAULT_MAX_VALUE: Self = 18_446_744_073_709_551_615usize

source§

const DEFAULT_MIN_VALUE: Self = 0usize

source§

impl Primitive for i8

source§

const DEFAULT_MAX_VALUE: Self = 127i8

source§

const DEFAULT_MIN_VALUE: Self = -128i8

source§

impl Primitive for u16

source§

const DEFAULT_MAX_VALUE: Self = 65_535u16

source§

const DEFAULT_MIN_VALUE: Self = 0u16

source§

impl Primitive for u8

source§

const DEFAULT_MAX_VALUE: Self = 255u8

source§

const DEFAULT_MIN_VALUE: Self = 0u8

source§

impl Primitive for u32

source§

const DEFAULT_MAX_VALUE: Self = 4_294_967_295u32

source§

const DEFAULT_MIN_VALUE: Self = 0u32

source§

impl Primitive for i32

source§

const DEFAULT_MAX_VALUE: Self = 2_147_483_647i32

source§

const DEFAULT_MIN_VALUE: Self = -2_147_483_648i32

source§

impl Primitive for f64

source§

const DEFAULT_MAX_VALUE: Self = 1f64

source§

const DEFAULT_MIN_VALUE: Self = 0f64

source§

impl Primitive for i16

source§

const DEFAULT_MAX_VALUE: Self = 32_767i16

source§

const DEFAULT_MIN_VALUE: Self = -32_768i16

Implementors§