macro_rules! wrapper { ($vis:vis $name:ident => $vis_inner:vis $inner:ty$(, derive($($derive:path),+))?) => { ... }; }
Helper macro for creating a wrapper type.
The wrapper type will implement Deref, DerefMut, From and AsRef.
Deref
DerefMut
From
AsRef
wrapper!(pub MyString => pub String); // derive is OK! wrapper!(pub MyStringDerived => pub String, derive(Debug, Clone, PartialEq, Eq, Hash));