1 2 3 4 5 6 7 8
#[derive(derive_more::From)] #[from(types(i32, "&str"))] struct Foo { foo: String, bar: String, } fn main() {}