Skip to content

Latest commit

 

History

History
29 lines (16 loc) · 679 Bytes

README.md

File metadata and controls

29 lines (16 loc) · 679 Bytes

Readme generated by Bing AI

impl-from-into-similar

A Rust crate that provides a macro to implement From and Into traits for similar types.

Installation

Add this to your Cargo.toml:

[dependencies] impl-from-into-similar = “0.1.0” 

Usage

Import the crate and use the impl_from_into_similar! macro with two or more types that have similar fields:

use impl_from_into_similar::impl_from_into_similar;

struct Foo { x: i32, y: i32, }

struct Bar { x: i32, y: i32, }

impl_from_into_similar!(Foo, Bar); 

License

This project is licensed under the MIT license.