newtype

Macro newtype 

Source
newtype!() { /* proc-macro */ }
Expand description

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);
}