difftreelog
feat add rmrk composable key support
in: master
1 file changed
pallets/proxy-rmrk-core/src/property.rsdiffbeforeafterboth757576#[macro_export]76#[macro_export]77macro_rules! rmrk_property {77macro_rules! rmrk_property {78 (Config=$cfg:ty, $key:ident: $value:expr) => {{78 (Config=$cfg:ty, $key:ident $(($key_ext:expr))?: $value:expr) => {{79 let key = rmrk_property!(@$cfg, $key)?;79 let key = rmrk_property!(@$cfg, $key $(($key_ext))?)?;808081 let value = $value.into_property_value()81 let value = $value.into_property_value()82 .map_err(<$crate::Error<$cfg>>::from)?;82 .map_err(<$crate::Error<$cfg>>::from)?;87 })87 })88 }};88 }};898990 (@$cfg:ty, $key:ident) => {90 (@$cfg:ty, $key:ident $(($key_ext:expr))?) => {91 $crate::RmrkProperty::$key.to_key::<$cfg>()91 $crate::RmrkProperty::$key $(($key_ext))?.to_key::<$cfg>()92 };92 };939394 (Config=$cfg:ty, $key:ident) => {94 (Config=$cfg:ty, $key:ident $(($key_ext:expr))?) => {95 PropertyScope::Rmrk.apply(rmrk_property!(@$cfg, $key)?)95 PropertyScope::Rmrk.apply(rmrk_property!(@$cfg, $key $(($key_ext))?)?)96 .map_err(|_| <$crate::Error<$cfg>>::RmrkPropertyKeyIsTooLong)96 .map_err(|_| <$crate::Error<$cfg>>::RmrkPropertyKeyIsTooLong)97 };97 };98}98}