#[struct_merge]
Expand description
Implement the struct_merge::StructMerge<S>
trait for all given targets.
Eiter a single struct or a list of structs can be provided.
StructMerge<T>
will then be implemented on each given target struct.
Examples:
#[struct_merge(crate::structs::Target)]
#[struct_merge([crate::structs::Target, crate:structs::OtherTarget])]
The targets struct paths have to be
- absolute
- relative to the current crate
- contained in this crate
struct.rs
ⓘ
use struct_merge::struct_merge;
pub struct Target {
pub test: String,
}
pub struct OtherTarget {
pub test: String,
}
#[struct_merge([crate::structs::Target, crate:structs::OtherTarget])]
pub struct Test {
pub test: String,
}