| Crates.io | macron-impl-into |
| lib.rs | macron-impl-into |
| version | 0.1.1 |
| created_at | 2025-04-06 15:00:14.672718+00 |
| updated_at | 2025-05-25 04:17:23.829672+00 |
| description | The implementation of trait Into |
| homepage | |
| repository | https://github.com/fuderis/rs-macron/tree/main/macron-impl-into |
| max_upload_size | |
| id | 1622978 |
| size | 9,224 |
The implementation of trait Into.
P.s.: More useful macros you can find here.
#[derive(Into, Debug, PartialEq)]
#[into(Insertion, "self.insertion")]
struct Test {
insertion: Insertion,
}
#[derive(Debug, PartialEq)]
struct Insertion;
assert_eq!(Insertion {}, Test { insertion: Insertion {} }.into());
#[derive(Into, Debug, PartialEq)]
#[into(Insertion, "match self { Self::Insertion(ins) => ins }")]
enum Test {
Insertion(Insertion),
}
#[derive(Debug, PartialEq)]
struct Insertion;
assert_eq!(Insertion {}, Test::Insertion(Insertion {}).into());
Distributed under the MIT license.
You can contact me via GitHub or send a message to my Telegram @fuderis.
This library is constantly evolving, and I welcome your suggestions and feedback.