Enum Format

#[non_exhaustive]
#[repr(u32)]
pub enum Format {
Show 143 variants Argb8888 = 0, Xrgb8888 = 1, C8 = 538_982_467, Rgb332 = 943_867_730, Bgr233 = 944_916_290, Xrgb4444 = 842_093_144, Xbgr4444 = 842_089_048, Rgbx4444 = 842_094_674, Bgrx4444 = 842_094_658, Argb4444 = 842_093_121, Abgr4444 = 842_089_025, Rgba4444 = 842_088_786, Bgra4444 = 842_088_770, Xrgb1555 = 892_424_792, Xbgr1555 = 892_420_696, Rgbx5551 = 892_426_322, Bgrx5551 = 892_426_306, Argb1555 = 892_424_769, Abgr1555 = 892_420_673, Rgba5551 = 892_420_434, Bgra5551 = 892_420_418, Rgb565 = 909_199_186, Bgr565 = 909_199_170, Rgb888 = 875_710_290, Bgr888 = 875_710_274, Xbgr8888 = 875_709_016, Rgbx8888 = 875_714_642, Bgrx8888 = 875_714_626, Abgr8888 = 875_708_993, Rgba8888 = 875_708_754, Bgra8888 = 875_708_738, Xrgb2101010 = 808_669_784, Xbgr2101010 = 808_665_688, Rgbx1010102 = 808_671_314, Bgrx1010102 = 808_671_298, Argb2101010 = 808_669_761, Abgr2101010 = 808_665_665, Rgba1010102 = 808_665_426, Bgra1010102 = 808_665_410, Yuyv = 1_448_695_129, Yvyu = 1_431_918_169, Uyvy = 1_498_831_189, Vyuy = 1_498_765_654, Ayuv = 1_448_433_985, Nv12 = 842_094_158, Nv21 = 825_382_478, Nv16 = 909_203_022, Nv61 = 825_644_622, Yuv410 = 961_959_257, Yvu410 = 961_893_977, Yuv411 = 825_316_697, Yvu411 = 825_316_953, Yuv420 = 842_093_913, Yvu420 = 842_094_169, Yuv422 = 909_202_777, Yvu422 = 909_203_033, Yuv444 = 875_713_881, Yvu444 = 875_714_137, R8 = 538_982_482, R16 = 540_422_482, Rg88 = 943_212_370, Gr88 = 943_215_175, Rg1616 = 842_221_394, Gr1616 = 842_224_199, Xrgb16161616f = 1_211_388_504, Xbgr16161616f = 1_211_384_408, Argb16161616f = 1_211_388_481, Abgr16161616f = 1_211_384_385, Xyuv8888 = 1_448_434_008, Vuy888 = 875_713_878, Vuy101010 = 808_670_550, Y210 = 808_530_521, Y212 = 842_084_953, Y216 = 909_193_817, Y410 = 808_531_033, Y412 = 842_085_465, Y416 = 909_194_329, Xvyu2101010 = 808_670_808, Xvyu1216161616 = 909_334_104, Xvyu16161616 = 942_954_072, Y0l0 = 810_299_481, X0l0 = 810_299_480, Y0l2 = 843_853_913, X0l2 = 843_853_912, Yuv4208bit = 942_691_673, Yuv42010bit = 808_539_481, Xrgb8888A8 = 943_805_016, Xbgr8888A8 = 943_800_920, Rgbx8888A8 = 943_806_546, Bgrx8888A8 = 943_806_530, Rgb888A8 = 943_798_354, Bgr888A8 = 943_798_338, Rgb565A8 = 943_797_586, Bgr565A8 = 943_797_570, Nv24 = 875_714_126, Nv42 = 842_290_766, P210 = 808_530_512, P010 = 808_530_000, P012 = 842_084_432, P016 = 909_193_296, Axbxgxrx106106106106 = 808_534_593, Nv15 = 892_425_806, Q410 = 808_531_025, Q401 = 825_242_705, Xrgb16161616 = 942_953_048, Xbgr16161616 = 942_948_952, Argb16161616 = 942_953_025, Abgr16161616 = 942_948_929, C1 = 538_980_675, C2 = 538_980_931, C4 = 538_981_443, D1 = 538_980_676, D2 = 538_980_932, D4 = 538_981_444, D8 = 538_982_468, R1 = 538_980_690, R2 = 538_980_946, R4 = 538_981_458, R10 = 540_029_266, R12 = 540_160_338, Avuy8888 = 1_498_764_865, Xvuy8888 = 1_498_764_888, P030 = 808_661_072, Rgb161616 = 942_950_226, Bgr161616 = 942_950_210, R16f = 1_210_064_978, Gr1616f = 1_210_077_767, Bgr161616f = 1_213_351_746, R32f = 1_176_510_546, Gr3232f = 1_176_523_335, Bgr323232f = 1_179_797_314, Abgr32323232f = 1_178_092_097, Nv20 = 808_605_262, Nv30 = 808_670_798, S010 = 808_530_003, S210 = 808_530_515, S410 = 808_531_027, S012 = 842_084_435, S212 = 842_084_947, S412 = 842_085_459, S016 = 909_193_299, S216 = 909_193_811, S416 = 909_194_323,
}
Available on crate feature wayland and Linux only.
Expand description

pixel formats

This describes the memory layout of an individual pixel.

All renderers should support argb8888 and xrgb8888 but any other formats are optional and may not be supported by the particular renderer in use.

The drm format codes match the macros defined in drm_fourcc.h, except argb8888 and xrgb8888. The formats actually supported by the compositor will be reported by the format event. See drm_fourcc.h for more detailed format descriptions.

For all wl_shm formats and unless specified in another protocol extension, pre-multiplied alpha is used for pixel values.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Argb8888 = 0

32-bit ARGB format, [31:0] A:R:G:B 8:8:8:8 little endian

§

Xrgb8888 = 1

32-bit RGB format, [31:0] x:R:G:B 8:8:8:8 little endian

§

C8 = 538_982_467

8-bit color index format, [7:0] C

§

Rgb332 = 943_867_730

8-bit RGB format, [7:0] R:G:B 3:3:2

§

Bgr233 = 944_916_290

8-bit BGR format, [7:0] B:G:R 2:3:3

§

Xrgb4444 = 842_093_144

16-bit xRGB format, [15:0] x:R:G:B 4:4:4:4 little endian

§

Xbgr4444 = 842_089_048

16-bit xBGR format, [15:0] x:B:G:R 4:4:4:4 little endian

§

Rgbx4444 = 842_094_674

16-bit RGBx format, [15:0] R:G:B:x 4:4:4:4 little endian

§

Bgrx4444 = 842_094_658

16-bit BGRx format, [15:0] B:G:R:x 4:4:4:4 little endian

§

Argb4444 = 842_093_121

16-bit ARGB format, [15:0] A:R:G:B 4:4:4:4 little endian

§

Abgr4444 = 842_089_025

16-bit ABGR format, [15:0] A:B:G:R 4:4:4:4 little endian

§

Rgba4444 = 842_088_786

16-bit RBGA format, [15:0] R:G:B:A 4:4:4:4 little endian

§

Bgra4444 = 842_088_770

16-bit BGRA format, [15:0] B:G:R:A 4:4:4:4 little endian

§

Xrgb1555 = 892_424_792

16-bit xRGB format, [15:0] x:R:G:B 1:5:5:5 little endian

§

Xbgr1555 = 892_420_696

16-bit xBGR 1555 format, [15:0] x:B:G:R 1:5:5:5 little endian

§

Rgbx5551 = 892_426_322

16-bit RGBx 5551 format, [15:0] R:G:B:x 5:5:5:1 little endian

§

Bgrx5551 = 892_426_306

16-bit BGRx 5551 format, [15:0] B:G:R:x 5:5:5:1 little endian

§

Argb1555 = 892_424_769

16-bit ARGB 1555 format, [15:0] A:R:G:B 1:5:5:5 little endian

§

Abgr1555 = 892_420_673

16-bit ABGR 1555 format, [15:0] A:B:G:R 1:5:5:5 little endian

§

Rgba5551 = 892_420_434

16-bit RGBA 5551 format, [15:0] R:G:B:A 5:5:5:1 little endian

§

Bgra5551 = 892_420_418

16-bit BGRA 5551 format, [15:0] B:G:R:A 5:5:5:1 little endian

§

Rgb565 = 909_199_186

16-bit RGB 565 format, [15:0] R:G:B 5:6:5 little endian

§

Bgr565 = 909_199_170

16-bit BGR 565 format, [15:0] B:G:R 5:6:5 little endian

§

Rgb888 = 875_710_290

24-bit RGB format, [23:0] R:G:B little endian

§

Bgr888 = 875_710_274

24-bit BGR format, [23:0] B:G:R little endian

§

Xbgr8888 = 875_709_016

32-bit xBGR format, [31:0] x:B:G:R 8:8:8:8 little endian

§

Rgbx8888 = 875_714_642

32-bit RGBx format, [31:0] R:G:B:x 8:8:8:8 little endian

§

Bgrx8888 = 875_714_626

32-bit BGRx format, [31:0] B:G:R:x 8:8:8:8 little endian

§

Abgr8888 = 875_708_993

32-bit ABGR format, [31:0] A:B:G:R 8:8:8:8 little endian

§

Rgba8888 = 875_708_754

32-bit RGBA format, [31:0] R:G:B:A 8:8:8:8 little endian

§

Bgra8888 = 875_708_738

32-bit BGRA format, [31:0] B:G:R:A 8:8:8:8 little endian

§

Xrgb2101010 = 808_669_784

32-bit xRGB format, [31:0] x:R:G:B 2:10:10:10 little endian

§

Xbgr2101010 = 808_665_688

32-bit xBGR format, [31:0] x:B:G:R 2:10:10:10 little endian

§

Rgbx1010102 = 808_671_314

32-bit RGBx format, [31:0] R:G:B:x 10:10:10:2 little endian

§

Bgrx1010102 = 808_671_298

32-bit BGRx format, [31:0] B:G:R:x 10:10:10:2 little endian

§

Argb2101010 = 808_669_761

32-bit ARGB format, [31:0] A:R:G:B 2:10:10:10 little endian

§

Abgr2101010 = 808_665_665

32-bit ABGR format, [31:0] A:B:G:R 2:10:10:10 little endian

§

Rgba1010102 = 808_665_426

32-bit RGBA format, [31:0] R:G:B:A 10:10:10:2 little endian

§

Bgra1010102 = 808_665_410

32-bit BGRA format, [31:0] B:G:R:A 10:10:10:2 little endian

§

Yuyv = 1_448_695_129

packed YCbCr format, [31:0] Cr0:Y1:Cb0:Y0 8:8:8:8 little endian

§

Yvyu = 1_431_918_169

packed YCbCr format, [31:0] Cb0:Y1:Cr0:Y0 8:8:8:8 little endian

§

Uyvy = 1_498_831_189

packed YCbCr format, [31:0] Y1:Cr0:Y0:Cb0 8:8:8:8 little endian

§

Vyuy = 1_498_765_654

packed YCbCr format, [31:0] Y1:Cb0:Y0:Cr0 8:8:8:8 little endian

§

Ayuv = 1_448_433_985

packed AYCbCr format, [31:0] A:Y:Cb:Cr 8:8:8:8 little endian

§

Nv12 = 842_094_158

2 plane YCbCr Cr:Cb format, 2x2 subsampled Cr:Cb plane

§

Nv21 = 825_382_478

2 plane YCbCr Cb:Cr format, 2x2 subsampled Cb:Cr plane

§

Nv16 = 909_203_022

2 plane YCbCr Cr:Cb format, 2x1 subsampled Cr:Cb plane

§

Nv61 = 825_644_622

2 plane YCbCr Cb:Cr format, 2x1 subsampled Cb:Cr plane

§

Yuv410 = 961_959_257

3 plane YCbCr format, 4x4 subsampled Cb (1) and Cr (2) planes

§

Yvu410 = 961_893_977

3 plane YCbCr format, 4x4 subsampled Cr (1) and Cb (2) planes

§

Yuv411 = 825_316_697

3 plane YCbCr format, 4x1 subsampled Cb (1) and Cr (2) planes

§

Yvu411 = 825_316_953

3 plane YCbCr format, 4x1 subsampled Cr (1) and Cb (2) planes

§

Yuv420 = 842_093_913

3 plane YCbCr format, 2x2 subsampled Cb (1) and Cr (2) planes

§

Yvu420 = 842_094_169

3 plane YCbCr format, 2x2 subsampled Cr (1) and Cb (2) planes

§

Yuv422 = 909_202_777

3 plane YCbCr format, 2x1 subsampled Cb (1) and Cr (2) planes

§

Yvu422 = 909_203_033

3 plane YCbCr format, 2x1 subsampled Cr (1) and Cb (2) planes

§

Yuv444 = 875_713_881

3 plane YCbCr format, non-subsampled Cb (1) and Cr (2) planes

§

Yvu444 = 875_714_137

3 plane YCbCr format, non-subsampled Cr (1) and Cb (2) planes

§

R8 = 538_982_482

[7:0] R

§

R16 = 540_422_482

[15:0] R little endian

§

Rg88 = 943_212_370

[15:0] R:G 8:8 little endian

§

Gr88 = 943_215_175

[15:0] G:R 8:8 little endian

§

Rg1616 = 842_221_394

[31:0] R:G 16:16 little endian

§

Gr1616 = 842_224_199

[31:0] G:R 16:16 little endian

§

Xrgb16161616f = 1_211_388_504

[63:0] x:R:G:B 16:16:16:16 little endian

§

Xbgr16161616f = 1_211_384_408

[63:0] x:B:G:R 16:16:16:16 little endian

§

Argb16161616f = 1_211_388_481

[63:0] A:R:G:B 16:16:16:16 little endian

§

Abgr16161616f = 1_211_384_385

[63:0] A:B:G:R 16:16:16:16 little endian

§

Xyuv8888 = 1_448_434_008

[31:0] X:Y:Cb:Cr 8:8:8:8 little endian

§

Vuy888 = 875_713_878

[23:0] Cr:Cb:Y 8:8:8 little endian

§

Vuy101010 = 808_670_550

Y followed by U then V, 10:10:10. Non-linear modifier only

§

Y210 = 808_530_521

[63:0] Cr0:0:Y1:0:Cb0:0:Y0:0 10:6:10:6:10:6:10:6 little endian per 2 Y pixels

§

Y212 = 842_084_953

[63:0] Cr0:0:Y1:0:Cb0:0:Y0:0 12:4:12:4:12:4:12:4 little endian per 2 Y pixels

§

Y216 = 909_193_817

[63:0] Cr0:Y1:Cb0:Y0 16:16:16:16 little endian per 2 Y pixels

§

Y410 = 808_531_033

[31:0] A:Cr:Y:Cb 2:10:10:10 little endian

§

Y412 = 842_085_465

[63:0] A:0:Cr:0:Y:0:Cb:0 12:4:12:4:12:4:12:4 little endian

§

Y416 = 909_194_329

[63:0] A:Cr:Y:Cb 16:16:16:16 little endian

§

Xvyu2101010 = 808_670_808

[31:0] X:Cr:Y:Cb 2:10:10:10 little endian

§

Xvyu1216161616 = 909_334_104

[63:0] X:0:Cr:0:Y:0:Cb:0 12:4:12:4:12:4:12:4 little endian

§

Xvyu16161616 = 942_954_072

[63:0] X:Cr:Y:Cb 16:16:16:16 little endian

§

Y0l0 = 810_299_481

[63:0] A3:A2:Y3:0:Cr0:0:Y2:0:A1:A0:Y1:0:Cb0:0:Y0:0 1:1:8:2:8:2:8:2:1:1:8:2:8:2:8:2 little endian

§

X0l0 = 810_299_480

[63:0] X3:X2:Y3:0:Cr0:0:Y2:0:X1:X0:Y1:0:Cb0:0:Y0:0 1:1:8:2:8:2:8:2:1:1:8:2:8:2:8:2 little endian

§

Y0l2 = 843_853_913

[63:0] A3:A2:Y3:Cr0:Y2:A1:A0:Y1:Cb0:Y0 1:1:10:10:10:1:1:10:10:10 little endian

§

X0l2 = 843_853_912

[63:0] X3:X2:Y3:Cr0:Y2:X1:X0:Y1:Cb0:Y0 1:1:10:10:10:1:1:10:10:10 little endian

§

Yuv4208bit = 942_691_673

§

Yuv42010bit = 808_539_481

§

Xrgb8888A8 = 943_805_016

§

Xbgr8888A8 = 943_800_920

§

Rgbx8888A8 = 943_806_546

§

Bgrx8888A8 = 943_806_530

§

Rgb888A8 = 943_798_354

§

Bgr888A8 = 943_798_338

§

Rgb565A8 = 943_797_586

§

Bgr565A8 = 943_797_570

§

Nv24 = 875_714_126

non-subsampled Cr:Cb plane

§

Nv42 = 842_290_766

non-subsampled Cb:Cr plane

§

P210 = 808_530_512

2x1 subsampled Cr:Cb plane, 10 bit per channel

§

P010 = 808_530_000

2x2 subsampled Cr:Cb plane 10 bits per channel

§

P012 = 842_084_432

2x2 subsampled Cr:Cb plane 12 bits per channel

§

P016 = 909_193_296

2x2 subsampled Cr:Cb plane 16 bits per channel

§

Axbxgxrx106106106106 = 808_534_593

[63:0] A:x:B:x:G:x:R:x 10:6:10:6:10:6:10:6 little endian

§

Nv15 = 892_425_806

2x2 subsampled Cr:Cb plane

§

Q410 = 808_531_025

§

Q401 = 825_242_705

§

Xrgb16161616 = 942_953_048

[63:0] x:R:G:B 16:16:16:16 little endian

§

Xbgr16161616 = 942_948_952

[63:0] x:B:G:R 16:16:16:16 little endian

§

Argb16161616 = 942_953_025

[63:0] A:R:G:B 16:16:16:16 little endian

§

Abgr16161616 = 942_948_929

[63:0] A:B:G:R 16:16:16:16 little endian

§

C1 = 538_980_675

[7:0] C0:C1:C2:C3:C4:C5:C6:C7 1:1:1:1:1:1:1:1 eight pixels/byte

§

C2 = 538_980_931

[7:0] C0:C1:C2:C3 2:2:2:2 four pixels/byte

§

C4 = 538_981_443

[7:0] C0:C1 4:4 two pixels/byte

§

D1 = 538_980_676

[7:0] D0:D1:D2:D3:D4:D5:D6:D7 1:1:1:1:1:1:1:1 eight pixels/byte

§

D2 = 538_980_932

[7:0] D0:D1:D2:D3 2:2:2:2 four pixels/byte

§

D4 = 538_981_444

[7:0] D0:D1 4:4 two pixels/byte

§

D8 = 538_982_468

[7:0] D

§

R1 = 538_980_690

[7:0] R0:R1:R2:R3:R4:R5:R6:R7 1:1:1:1:1:1:1:1 eight pixels/byte

§

R2 = 538_980_946

[7:0] R0:R1:R2:R3 2:2:2:2 four pixels/byte

§

R4 = 538_981_458

[7:0] R0:R1 4:4 two pixels/byte

§

R10 = 540_029_266

[15:0] x:R 6:10 little endian

§

R12 = 540_160_338

[15:0] x:R 4:12 little endian

§

Avuy8888 = 1_498_764_865

[31:0] A:Cr:Cb:Y 8:8:8:8 little endian

§

Xvuy8888 = 1_498_764_888

[31:0] X:Cr:Cb:Y 8:8:8:8 little endian

§

P030 = 808_661_072

2x2 subsampled Cr:Cb plane 10 bits per channel packed

§

Rgb161616 = 942_950_226

[47:0] R:G:B 16:16:16 little endian

§

Bgr161616 = 942_950_210

[47:0] B:G:R 16:16:16 little endian

§

R16f = 1_210_064_978

[15:0] R 16 little endian

§

Gr1616f = 1_210_077_767

[31:0] G:R 16:16 little endian

§

Bgr161616f = 1_213_351_746

[47:0] B:G:R 16:16:16 little endian

§

R32f = 1_176_510_546

[31:0] R 32 little endian

§

Gr3232f = 1_176_523_335

[63:0] R:G 32:32 little endian

§

Bgr323232f = 1_179_797_314

[95:0] R:G:B 32:32:32 little endian

§

Abgr32323232f = 1_178_092_097

[127:0] R:G:B:A 32:32:32:32 little endian

§

Nv20 = 808_605_262

2x1 subsampled Cr:Cb plane

§

Nv30 = 808_670_798

non-subsampled Cr:Cb plane

§

S010 = 808_530_003

2x2 subsampled Cb (1) and Cr (2) planes 10 bits per channel

§

S210 = 808_530_515

2x1 subsampled Cb (1) and Cr (2) planes 10 bits per channel

§

S410 = 808_531_027

non-subsampled Cb (1) and Cr (2) planes 10 bits per channel

§

S012 = 842_084_435

2x2 subsampled Cb (1) and Cr (2) planes 12 bits per channel

§

S212 = 842_084_947

2x1 subsampled Cb (1) and Cr (2) planes 12 bits per channel

§

S412 = 842_085_459

non-subsampled Cb (1) and Cr (2) planes 12 bits per channel

§

S016 = 909_193_299

2x2 subsampled Cb (1) and Cr (2) planes 16 bits per channel

§

S216 = 909_193_811

2x1 subsampled Cb (1) and Cr (2) planes 16 bits per channel

§

S416 = 909_194_323

non-subsampled Cb (1) and Cr (2) planes 16 bits per channel

Trait Implementations§

§

impl Clone for Format

§

fn clone(&self) -> Format

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for Format

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Hash for Format

§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
§

impl Ord for Format

§

fn cmp(&self, other: &Format) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
§

impl PartialEq for Format

§

fn eq(&self, other: &Format) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

impl PartialOrd for Format

§

fn partial_cmp(&self, other: &Format) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
§

impl TryFrom<u32> for Format

§

type Error = ()

The type returned in the event of a conversion error.
§

fn try_from(val: u32) -> Result<Format, ()>

Performs the conversion.
§

impl Copy for Format

§

impl Eq for Format

§

impl StructuralPartialEq for Format

Auto Trait Implementations§

§

impl Freeze for Format

§

impl RefUnwindSafe for Format

§

impl Send for Format

§

impl Sync for Format

§

impl Unpin for Format

§

impl UnwindSafe for Format

Blanket Implementations§

Source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
where T: Real + Zero + Arithmetics + Clone, Swp: WhitePoint<T>, Dwp: WhitePoint<T>, D: AdaptFrom<S, Swp, Dwp, T>,

Source§

fn adapt_into_using<M>(self, method: M) -> D
where M: TransformMatrix<T>,

Convert the source color to the destination color using the specified method.
Source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford method by default.
§

impl<T> Also for T

§

fn also<F>(self, block: F) -> Self
where F: FnOnce(&mut Self),

Apply a function to this value and return the (possibly) modified value.
Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> AnyEq for T
where T: Any + PartialEq,

§

fn equals(&self, other: &(dyn Any + 'static)) -> bool

§

fn as_any(&self) -> &(dyn Any + 'static)

§

impl<T, Res> Apply<Res> for T
where T: ?Sized,

§

fn apply<F>(self, f: F) -> Res
where F: FnOnce(Self) -> Res, Self: Sized,

Apply a function which takes the parameter by value.
§

fn apply_ref<F>(&self, f: F) -> Res
where F: FnOnce(&Self) -> Res,

Apply a function which takes the parameter by reference.
§

fn apply_mut<F>(&mut self, f: F) -> Res
where F: FnOnce(&mut Self) -> Res,

Apply a function which takes the parameter by mutable reference.
Source§

impl<T, C> ArraysFrom<C> for T
where C: IntoArrays<T>,

Source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
Source§

impl<T, C> ArraysInto<C> for T
where C: FromArrays<T>,

Source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<WpParam, T, U> Cam16IntoUnclamped<WpParam, T> for U
where T: FromCam16Unclamped<WpParam, U>,

Source§

type Scalar = <T as FromCam16Unclamped<WpParam, U>>::Scalar

The number type that’s used in parameters when converting.
Source§

fn cam16_into_unclamped( self, parameters: BakedParameters<WpParam, <U as Cam16IntoUnclamped<WpParam, T>>::Scalar>, ) -> T

Converts self into C, using the provided parameters.
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
Source§

impl<T, C> ComponentsFrom<C> for T
where C: IntoComponents<T>,

Source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromAngle<T> for T

Source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
Source§

impl<T, U> FromStimulus<U> for T
where U: IntoStimulus<T>,

Source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, rounding and clamping.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> IntoAngle<U> for T
where U: FromAngle<T>,

Source§

fn into_angle(self) -> U

Performs a conversion into T.
§

impl<State, Message> IntoBoot<State, Message> for State

§

fn into_boot(self) -> (State, Task<Message>)

Turns some type into the initial state of some Application.
Source§

impl<WpParam, T, U> IntoCam16Unclamped<WpParam, T> for U
where T: Cam16FromUnclamped<WpParam, U>,

Source§

type Scalar = <T as Cam16FromUnclamped<WpParam, U>>::Scalar

The number type that’s used in parameters when converting.
Source§

fn into_cam16_unclamped( self, parameters: BakedParameters<WpParam, <U as IntoCam16Unclamped<WpParam, T>>::Scalar>, ) -> T

Converts self into C, using the provided parameters.
Source§

impl<T, U> IntoColor<U> for T
where U: FromColor<T>,

Source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
Source§

impl<T, U> IntoColorUnclamped<U> for T
where U: FromColorUnclamped<T>,

Source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
Source§

impl<T> IntoStimulus<T> for T

Source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, rounding and clamping.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, C> TryComponentsInto<C> for T
where C: TryFromComponents<T>,

Source§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
Source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of colors. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T, U> TryIntoColor<U> for T
where U: TryFromColor<T>,

Source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined range, otherwise an OutOfBounds error is returned which contains the unclamped color. Read more
Source§

impl<C, U> UintsFrom<C> for U
where C: IntoUints<U>,

Source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
Source§

impl<C, U> UintsInto<C> for U
where C: FromUints<U>,

Source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<T> MaybeClone for T

§

impl<T> MaybeDebug for T

§

impl<T> MaybeSend for T
where T: Send,

§

impl<T> MaybeSend for T
where T: Send,

§

impl<T> MaybeSync for T
where T: Sync,

§

impl<T> MaybeSync for T
where T: Sync,