Derive Macro fundamental_data_type::VariadicFrom
source · #[derive(VariadicFrom)]
Expand description
Derive macro to implement default constructors From_0
, From_1
, From_2
, From_3
.
§Sample :: struct instead of macro.
Write this
ⓘ
#[ derive( Make ) ]
pub struct IsTransparent( bool );
Instead of this
ⓘ
pub struct IsTransparent( bool );
impl From_0 for IsTransparent
{
fn make0() -> Self
{
Self::default();
}
}
impl From_1 for IsTransparent
{
fn make1( src : bool ) -> Self
{
Self( src )
}
}