Macro impl_from_for_primitive
Source macro_rules! impl_from_for_primitive {
($from:ty => $this:ty $(,)?) => { ... };
}
Expand description
Implement From
for a primitive.
ยงExamples
With a newtype struct:
use impl_more::impl_from_for_primitive;
struct Checked(bool);
impl_from_for_primitive!(Checked => bool);
let foo = bool::from(Checked(true));