cosmic::iced_winit::graphics::image::image_rs

Trait Primitive

source
pub trait Primitive:
    Copy
    + NumCast
    + Num
    + PartialOrd
    + 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.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Primitive for f32

source§

impl Primitive for f64

source§

impl Primitive for i8

source§

impl Primitive for i16

source§

const DEFAULT_MAX_VALUE: i16 = 32_767i16

source§

const DEFAULT_MIN_VALUE: i16 = -32_768i16

source§

impl Primitive for i32

source§

const DEFAULT_MAX_VALUE: i32 = 2_147_483_647i32

source§

const DEFAULT_MIN_VALUE: i32 = -2_147_483_648i32

source§

impl Primitive for i64

source§

const DEFAULT_MAX_VALUE: i64 = 9_223_372_036_854_775_807i64

source§

const DEFAULT_MIN_VALUE: i64 = -9_223_372_036_854_775_808i64

source§

impl Primitive for isize

source§

const DEFAULT_MAX_VALUE: isize = 9_223_372_036_854_775_807isize

source§

const DEFAULT_MIN_VALUE: isize = -9_223_372_036_854_775_808isize

source§

impl Primitive for u8

source§

impl Primitive for u16

source§

impl Primitive for u32

source§

const DEFAULT_MAX_VALUE: u32 = 4_294_967_295u32

source§

const DEFAULT_MIN_VALUE: u32 = 0u32

source§

impl Primitive for u64

source§

const DEFAULT_MAX_VALUE: u64 = 18_446_744_073_709_551_615u64

source§

const DEFAULT_MIN_VALUE: u64 = 0u64

source§

impl Primitive for usize

source§

const DEFAULT_MAX_VALUE: usize = 18_446_744_073_709_551_615usize

source§

const DEFAULT_MIN_VALUE: usize = 0usize

Implementors§