[−][src]Macro trapper_macro::newtype
newtype!() { /* proc-macro */ }
Creates a new wrapper type. This type is transparent and implements trapper::Wrapper
Examples
use trapper::newtype; newtype!(type BasicNumber(i32)); newtype!(pub type WithVisibility(i32)); newtype!(pub type WithLifetimes<'a>(std::io::StderrLock<'a>)); newtype!(pub type WithTypeParameters<T>(T)); newtype!(pub type WithBoth<'a, T>(&'a T)); newtype!(pub type WithClause<'a, T>(&'a T) where T: Default); newtype! { /// a summary pub type WithAttributes(i32); }