#[non_exhaustive]pub struct ColorInfo {
pub color_families: Vec<String>,
pub colors: Vec<String>,
/* private fields */
}Expand description
The color information of a Product.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.color_families: Vec<String>The standard color families. Strongly recommended to use the following standard color groups: “Red”, “Pink”, “Orange”, “Yellow”, “Purple”, “Green”, “Cyan”, “Blue”, “Brown”, “White”, “Gray”, “Black” and “Mixed”. Normally it is expected to have only 1 color family. May consider using single “Mixed” instead of multiple values.
A maximum of 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.
Google Merchant Center property color. Schema.org property Product.color.
The colorFamilies field as a system attribute is not a required field but strongly recommended to be specified. Google Search models treat this field as more important than a custom product attribute when specified.
colors: Vec<String>The color display names, which may be different from standard color family names, such as the color aliases used in the website frontend. Normally it is expected to have only 1 color. May consider using single “Mixed” instead of multiple values.
A maximum of 75 colors are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.
Google Merchant Center property color. Schema.org property Product.color.
Implementations§
Source§impl ColorInfo
impl ColorInfo
Sourcepub fn set_color_families<T, V>(self, v: T) -> Self
pub fn set_color_families<T, V>(self, v: T) -> Self
Sets the value of color_families.
§Example
let x = ColorInfo::new().set_color_families(["a", "b", "c"]);