Expand description
Utilities for serializing and deserializing with serde
.
These modules and functions can be combined with serde
’s field
attributes to better control how to
serialize and deserialize colors. See each item’s examples for more details.
Modules§
- as_
array - Combines
serialize_as_array
anddeserialize_as_array
as a module for#[serde(with = "...")]
. - as_uint
- Combines
serialize_as_uint
anddeserialize_as_uint
as a module for#[serde(with = "...")]
.
Functions§
- deserialize_
as_ array - Deserialize a value from an array of its components.
- deserialize_
as_ uint - Deserialize a value from an unsigned integer.
- deserialize_
with_ optional_ alpha - Deserialize a transparent color without requiring the alpha to be specified.
- deserialize_
with_ optional_ pre_ alpha - Deserialize a premultiplied transparent color without requiring the alpha to be specified.
- serialize_
as_ array - Serialize the value as an array of its components.
- serialize_
as_ uint - Serialize the value as an unsigned integer.