meta_merge

Crates.iometa_merge
lib.rsmeta_merge
version0.1.1
created_at2025-10-14 05:06:48.380393+00
updated_at2025-10-14 14:38:59.382734+00
descriptionCopy, deep-merge, and apply Rust attributes from one item to another
homepage
repositoryhttps://github.com/StrikeForceZero/meta_merge
max_upload_size
id1881696
size13,372
Brett Striker (StrikeForceZero)

documentation

README

Meta Merge

License Crates.io Downloads Docs CI

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:

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.

Commit count: 0

cargo fmt