macro_rules! impl_maybe_marker_std_or_serde { ( $( $(#[$doc:meta] )+ trait $trait_name:ident: $( $trait_bound:path ),+; )+ ) => { ... }; }
Expand description
Macro for creating Maybe*
marker traits.
Such a maybe-marker trait requires the given bound when either feature = std
or feature = serde
is activated.
§Example
sp_core::impl_maybe_marker_std_or_serde! {
/// A marker for a type that implements `Debug` when `feature = serde` or `feature = std`.
trait MaybeDebug: std::fmt::Debug;
/// A marker for a type that implements `Debug + Display` when `feature = serde` or `feature = std`.
trait MaybeDebugDisplay: std::fmt::Debug, std::fmt::Display;
}