12345use codec::{Decode, Encode};6use scale_info::TypeInfo;78#[cfg(feature = "std")]9use serde::Serialize;1011#[cfg(feature = "std")]12use crate::serialize;1314#[cfg_attr(feature = "std", derive(Eq, Serialize))]15#[derive(Encode, Decode, Debug, TypeInfo, Clone, PartialEq)]16#[cfg_attr(17 feature = "std",18 serde(bound = r#"19 BoundedString: AsRef<[u8]>,20 PropertyList: AsRef<[ThemeProperty<BoundedString>]>,21 "#)22)]23pub struct Theme<BoundedString, PropertyList> {24 25 #[cfg_attr(feature = "std", serde(with = "serialize::vec"))]26 pub name: BoundedString,2728 29 #[cfg_attr(feature = "std", serde(with = "serialize::vec"))]30 pub properties: PropertyList,31 32 pub inherit: bool,33}3435#[cfg_attr(feature = "std", derive(Eq, Serialize))]36#[derive(Encode, Decode, Debug, TypeInfo, Clone, PartialEq)]37#[cfg_attr(feature = "std", serde(bound = "BoundedString: AsRef<[u8]>"))]38pub struct ThemeProperty<BoundedString> {39 40 #[cfg_attr(feature = "std", serde(with = "serialize::vec"))]41 pub key: BoundedString,4243 44 #[cfg_attr(feature = "std", serde(with = "serialize::vec"))]45 pub value: BoundedString,46}