Simple Rust library for auto generating conversion methods
toml
[dependencies]
struct_auto_from = "0.1.0"
```rust use structautofrom::auto_from;
pub struct UserModel { id: i32, name: String, }
pub struct UserType { id: i32, name: String, }
fn main() { let user_model = UserModel { id: 0, name: "GvR".into(), };
let user_type: UserType = user_model.into();
// use user_type without the need for manual conversion
// ...
} ```
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.