2 releases
Uses new Rust 2024
| 0.1.1 | Oct 14, 2025 |
|---|---|
| 0.1.0 | Oct 14, 2025 |
#17 in #apply
Used in 2 crates
(via meta_merge)
71KB
1.5K
SLoC
Meta Merge
Example
Basic
use meta_merge::*;
#[export(copy(prepend))]
#[derive(Debug)]
struct DefaultFoo;
#[apply(CopyDefaultFoo!)]
#[derive(PartialEq)]
struct Foo;
/* becomes:
#[derive(Debug)]
#[derive(PartialEq)]
struct Foo;
*/
use meta_merge::*;
use serde::{Deserialize, Serialize};
use serde_json::json;
#[allow(dead_code)]
#[export(merge)]
#[derive(Debug, Serialize, Deserialize)]
struct DefaultFoo;
#[apply(MergeDefaultFoo!)]
#[derive(PartialEq)]
struct Foo {
a: u32,
b: String,
c: bool,
}
/* becomes:
#[derive(PartialEq, Debug, Serialize, Deserialize)]
struct Foo {
a: u32,
b: String,
c: bool,
}
*/
License
All code in this repository is dual-licensed under either:
-
MIT License (LICENSE-MIT or http://opensource.org/licenses/MIT)
-
Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
at your option. This means you can select the license you prefer.
Your Contributions
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.
Dependencies
~4MB
~92K SLoC