1use codec::{Decode, Encode};2use scale_info::TypeInfo;34#[cfg(feature = "std")]5use serde::Serialize;67#[cfg(feature = "std")]8use crate::serialize;910#[cfg_attr(feature = "std", derive(Eq, Serialize))]11#[derive(Encode, Decode, Debug, TypeInfo, Clone, PartialEq)]12#[cfg_attr(13 feature = "std",14 serde(bound = r#"15 BoundedString: AsRef<[u8]>,16 PropertyList: AsRef<[ThemeProperty<BoundedString>]>,17 "#)18)]19pub struct Theme<BoundedString, PropertyList> {20 21 #[cfg_attr(feature = "std", serde(with = "serialize::vec"))]22 pub name: BoundedString,2324 25 #[cfg_attr(feature = "std", serde(with = "serialize::vec"))]26 pub properties: PropertyList,27 28 pub inherit: bool,29}3031#[cfg_attr(feature = "std", derive(Eq, Serialize))]32#[derive(Encode, Decode, Debug, TypeInfo, Clone, PartialEq)]33#[cfg_attr(feature = "std", serde(bound = "BoundedString: AsRef<[u8]>"))]34pub struct ThemeProperty<BoundedString> {35 36 #[cfg_attr(feature = "std", serde(with = "serialize::vec"))]37 pub key: BoundedString,3839 40 #[cfg_attr(feature = "std", serde(with = "serialize::vec"))]41 pub value: BoundedString,42}