#[derive(InnerFrom)]
Expand description

Derive macro to implement From converting outer type into inner when-ever it’s possible to do automatically.

§Sample :: struct instead of macro.

Write this

#[ derive( InnerFrom ) ]
pub struct IsTransparent( bool );

Instead of this

pub struct IsTransparent( bool );
impl From< IsTransparent > for bool
{
  #[ inline( always ) ]
  fn from( src : IsTransparent ) -> Self
  {
    src.0
  }
}